Subpicture size definition in video processing

ABSTRACT

A method of video processing includes performing a conversion between a video comprising a video picture that includes multiple sub-pictures and multiple video blocks, and a coded representation of the video according to a rule. The rule specifies that a boundary between any two sub-pictures is also a boundary between two video blocks.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a continuation of International Patent ApplicationNo. PCT/CN2020/108159, filed on Aug. 10, 2020, which claims the priorityto and benefits of International Patent Application No.PCT/CN2019/100114, filed on Aug. 10, 2019. All the aforementioned patentapplications are hereby incorporated by reference in their entireties.

TECHNICAL FIELD

This document is related to video and image coding and decodingtechnologies.

BACKGROUND

Digital video accounts for the largest bandwidth use on the internet andother digital communication networks. As the number of connected userdevices capable of receiving and displaying video increases, it isexpected that the bandwidth demand for digital video usage will continueto grow.

SUMMARY

The disclosed techniques may be used by video or image decoder orencoder embodiments for in which sub-picture based coding or decoding isperformed.

In one example aspect a method of video processing is disclosed. Themethod includes determining, for a conversion between a current block ofa first picture of a video and a bitstream representation of the video,a motion candidate based on motion information from a second pictureaccording to a rule. The rule specifies that a position from which themotion information is accessed is constrained to be within a specificsubpicture of the second picture. The method also includes performingthe conversion based on the determining.

In another example aspect a method of video processing is disclosed. Themethod includes determining, for a conversion of a current block of afirst picture of a video and a bitstream representation of the video, aninteger sample from a second picture according to a rule. The secondpicture comprises a reference picture that is not used in aninterpolation process. The rule specifies that a position from which theinteger sample is accessed is constrained to be within a specificsubpicture of the second picture. The method also includes performingthe conversion based on the determining.

In another example aspect a method of video processing is disclosed. Themethod includes determining, for a conversion of a current block of avideo and a bitstream representation of the video, a position at which areconstructed luma sample is accessed according to a rule. The rulespecifies that the position is constrained to be within a specificsubpicture of a video picture. The method also includes performing theconversion based on the determining.

In another example aspect a method of video processing is disclosed. Themethod includes determining, for a conversion of a current block of avideo and a bitstream representation of the video, a position at which apicture boundary check is performed according to a rule. The rulespecifies that the position is constrained to be within a specificsubpicture of a video picture. The method also includes performing theconversion based on the determining.

In another example aspect a method of video processing is disclosed. Themethod includes resetting, after a conversion of a sub-picture of avideo picture of a video and a bitstream representation of the video, atable of motion candidates derived based on past conversions andperforming a conversion of a subsequent sub-picture of the video pictureand the bitstream representation using the table after the resetting.

In another example aspect a method of video processing is disclosed. Themethod includes performing a conversion between a video comprising avideo picture that includes multiple sub-pictures and multiple videoblocks and a coded representation of the video according to a rule. Therule specifies that a boundary between any two sub-pictures is also aboundary between two video blocks. A video block in the video picture iscovered by a single subpicture of the video picture.

In another example aspect a method of video processing is disclosed. Themethod includes performing a conversion between a video unit of a videoand a coded representation of the video using at least a video picture,where only one of a sub-picture coding mode or a resolution-changingcoding mode is enabled for the video unit. The sub-picture coding modeis a mode in which the video picture is divided into multiplesub-pictures, and the resolution-changing coding mode is a mode in whicha resolution of the video picture is adjusted during the conversion.

In another example aspect a method of video processing is disclosed. Themethod includes performing a conversion between a video unit of a videoand a coded representation of the video using at least a video picture,where both a sub-picture coding mode and a resolution-changing codingmode are enabled for the video unit. The sub-picture coding mode is amode in which the video picture is divided into multiple sub-pictures,and the resolution-changing coding mode is a mode in which a resolutionof the video picture is adjusted during the conversion.

In another example aspect a method of video processing is disclosed. Themethod includes performing a conversion between a video comprising oneor more video pictures and a coded representation of the video, where adimension of an individual video picture is constrained to be greaterthan or equal to 8. In some embodiments, the dimension is a width of theindividual video picture.

In another example aspect a method of video processing is disclosed. Themethod includes performing a conversion between a video picture of avideo and a coded representation of the video according to a rule. Thevideo picture comprises at least one sub-picture, and the rule specifiesthat a characteristic of a sub-picture is represented as at lease onesyntax element in the coded representation, the at least one syntaxelement being different than an index value of the sub-picture grid inthe video picture.

In another example aspect a method of video processing is disclosed. Themethod includes performing a conversion between a video picture of avideo and a coded representation of the video according to a rule. Thevideo picture comprises multiple sub-pictures, each sub-picturecomprising multiple elements. The rule specifies that a dimension ofindividual elements in a sub-picture satisfies a constraint.

In another example aspect a method of video processing is disclosed. Themethod includes performing a conversion between a video comprising apicture that includes multiple sub-pictures and a coded representationof the video using a coding mode according to a rule. The rule specifiesthat certain stored information about a previous sub-picture is resetprior to processing each next sub-picture of the multiple sub-pictures.

In another example aspect a method of video processing is disclosed. Themethod includes performing a temporal filtering operation in aconversion between a video and a coded representation of the videoaccording to a rule. The video comprises multiple video pictures, eachcomprising multiple sub-pictures. The rule specifies that, for atemporal filtering a current sample in a current sub-picture of a videopicture, only samples within the same current sub-picture or asub-picture in a different video picture corresponding to the currentsub-picture are available.

In another example aspect a method of video processing is disclosed. Themethod includes determining, for a conversion between a block in a videopicture of a video and a coded representation of the video, a manner ofapplying a partitioning method to the block based on whether the blockcrosses one or more sub-picture boundaries of the video picture. Themethod also includes performing the conversion based on the determining.

In another example aspect a method of video processing is disclosed. Themethod includes for a conversion between a video picture of a video anda coded representation of the video, two sub-regions of the videopicture. A first sub-region comprises multiple sub-pictures of the videopicture and a second sub-region comprises remaining samples in the videopicture. The method also includes performing the conversion based on thedetermining.

In another example aspect a method of video processing is disclosed. Themethod includes determining, for a video block in a first video regionof a video, whether a position at which a temporal motion vectorpredictor is determined for a conversion between the video block and abitstream representation of the current video block using an affine modeis within a second video region; and performing the conversion based onthe determining.

In another example aspect, another method of video processing isdisclosed. The method includes determining, for a video block in a firstvideo region of a video, whether a position at which an integer samplein a reference picture is fetched for a conversion between the videoblock and a bitstream representation of the current video block iswithin a second video region, wherein the reference picture is not usedin an interpolation process during the conversion; and performing theconversion based on the determining.

In another example aspect, another method of video processing isdisclosed. The method includes determining, for a video block in a firstvideo region of a video, whether a position at which a reconstructedluma sample value is fetched for a conversion between the video blockand a bitstream representation of the current video block is within asecond video region; and performing the conversion based on thedetermining.

In another example aspect, another method of video processing isdisclosed. The method includes determining, for a video block in a firstvideo region of a video, whether a position at which a check regardingsplitting, depth derivation or split flag signaling for the video blockis performed during a conversion between the video block and a bitstreamrepresentation of the current video block is within a second videoregion; and performing the conversion based on the determining.

In another example aspect, another method of video processing isdisclosed. The method includes performing a conversion between a videocomprising one or more video pictures comprising one or more videoblocks, and a coded representation of the video, wherein the codedrepresentation complies with a coding syntax requirement that theconversion is not to use sub-picture coding/decoding and a dynamicresolution conversion coding/decoding tool or a reference pictureresampling tool within a video unit.

In another example aspect, another method of video processing isdisclosed. The method includes performing a conversion between a videocomprising one or more video pictures comprising one or more videoblocks, and a coded representation of the video, wherein the codedrepresentation complies with a coding syntax requirement that a firstsyntax element subpic_grid_idx[i][j] is not larger than a second syntaxelement max_subpics_minus1.

In yet another example aspect, the above-described method may beimplemented by a video encoder apparatus that comprises a processor.

In yet another example aspect, the above-described method may beimplemented by a video decoder apparatus that comprises a processor.

In yet another example aspect, these methods may be embodied in the formof processor-executable instructions and stored on a computer-readableprogram medium.

These, and other, aspects are further described in the present document.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows an example of region constraint in temporal motion vectorprediction (TMVP) and sub-block TMVP.

FIG. 2 shows an example of a hierarchical motion estimation scheme.

FIG. 3 is a block diagram of an example of a hardware platform used forimplementing techniques described in the present document.

FIG. 4 is a flowchart for an example method of video processing.

FIG. 5 is a block diagram showing an example video processing system inwhich various techniques disclosed herein may be implemented.

FIG. 6 is a flowchart representation of a method for video processing inaccordance with the present technology.

FIG. 7 is a flowchart representation of another method for videoprocessing in accordance with the present technology.

FIG. 8 is a flowchart representation of another method for videoprocessing in accordance with the present technology.

FIG. 9 is a flowchart representation of another method for videoprocessing in accordance with the present technology.

FIG. 10 is a flowchart representation of another method for videoprocessing in accordance with the present technology.

FIG. 11 is a flowchart representation of another method for videoprocessing in accordance with the present technology.

FIG. 12 is a flowchart representation of another method for videoprocessing in accordance with the present technology.

FIG. 13 is a flowchart representation of another method for videoprocessing in accordance with the present technology.

FIG. 14 is a flowchart representation of another method for videoprocessing in accordance with the present technology.

FIG. 15 is a flowchart representation of another method for videoprocessing in accordance with the present technology.

FIG. 16 is a flowchart representation of another method for videoprocessing in accordance with the present technology.

FIG. 17 is a flowchart representation of another method for videoprocessing in accordance with the present technology.

FIG. 18 is a flowchart representation of another method for videoprocessing in accordance with the present technology.

FIG. 19 is a flowchart representation of another method for videoprocessing in accordance with the present technology.

FIG. 20 is a flowchart representation of yet another method for videoprocessing in accordance with the present technology.

DETAILED DESCRIPTION

The present document provides various techniques that can be used by adecoder of image or video bitstreams to improve the quality ofdecompressed or decoded digital video or images. For brevity, the term“video” is used herein to include both a sequence of pictures(traditionally called video) and individual images. Furthermore, a videoencoder may also implement these techniques during the process ofencoding in order to reconstruct decoded frames used for furtherencoding.

Section headings are used in the present document for ease ofunderstanding and do not limit the embodiments and techniques to thecorresponding sections. As such, embodiments from one section can becombined with embodiments from other sections.

1. Summary

This document is related to video coding technologies. Specifically, itis related to palette coding with employing base colors basedrepresentation in video coding. It may be applied to the existing videocoding standard like HEVC, or the standard (Versatile Video Coding) tobe finalized. It may be also applicable to future video coding standardsor video codec.

2. Initial Discussion

Video coding standards have evolved primarily through the development ofthe well-known ITU-T and ISO/IEC standards. The ITU-T produced H.261 andH.263, ISO/IEC produced MPEG-1 and MPEG-4 Visual, and the twoorganizations jointly produced the H.262/MPEG-2 Video and H.264/MPEG-4Advanced Video Coding (AVC) and H.265/HEVC standards [1,2]. Since H.262,the video coding standards are based on the hybrid video codingstructure wherein temporal prediction plus transform coding areutilized. To explore the future video coding technologies beyond HEVC,Joint Video Exploration Team (JVET) was founded by VCEG and MPEG jointlyin 2015. Since then, many new methods have been adopted by JVET and putinto the reference software named Joint Exploration Model (JEM). InApril 2018, the Joint Video Expert Team (JVET) between VCEG (Q6/16) andISO/IEC JTC1 SC29/WG11 (MPEG) was created to work on the VVC standardtargeting at 50% bitrate reduction compared to HEVC.

2.1 The Region Constraint in TMVP and Sub-Block TMVP in VVC

FIG. 1 illustrates example region constraint in TMVP and sub-block TMVP.In TMVP and sub-block TMVP, it is constrained that a temporal MV canonly be fetched from the collocated CTU plus a column of 4×4 blocks asshown in FIG. 1.

2.2 Example Sub-Picture

In some embodiments, sub-picture-based coding techniques based onflexible tiling approach can be implemented. Summary of thesub-picture-based coding techniques includes the following:

(1) Pictures can be divided into sub-pictures.

(2) The indication of existence of sub-pictures is indicated in the SPS,along with other sequence-level information of sub-pictures.

(3) Whether a sub-picture is treated as a picture in the decodingprocess (excluding in-loop filtering operations) can be controlled bythe bitstream.

(4) Whether in-loop filtering across sub-picture boundaries is disabledcan be controlled by the bitstream for each sub-picture. The DBF, SAO,and ALF processes are updated for controlling of in-loop filteringoperations across sub-picture boundaries.

(5) For simplicity, as a starting point, the sub-picture width, height,horizontal offset, and vertical offset are signalled in units of lumasamples in SPS. Sub-picture boundaries are constrained to be sliceboundaries.

(6) Treating a sub-picture as a picture in the decoding process(excluding in-loop filtering operations) is specified by slightlyupdating the coding_tree_unit( ) syntax, and updates to the followingdecoding processes:

-   -   The derivation process for (advanced) temporal luma motion        vector prediction    -   The luma sample bilinear interpolation process    -   The luma sample 8-tap interpolation filtering process    -   The chroma sample interpolation process

(7) Sub-picture IDs are explicitly specified in the SPS and included inthe tile group headers to enable extraction of sub-picture sequenceswithout the need of changing VCL NAL units.

(8) Output sub-picture sets (OSPS) are proposed to specify normativeextraction and conformance points for sub-pictures and sets thereof.

2.3 Example Sub-Pictures in Versatile Video Coding Sequence ParameterSet RBSP Syntax

Descriptor seq_parameter_set_rbsp( ) {  sps_decoding_parameter_set_idu(4)  sps_video_parameter_set_id u(4) ...  pic_width_max_in_luma_samplesue(v)  pic_height_max_in_luma_samples ue(v)  subpics_present_flag u(1) if( subpics_present_flag ) {   max_subpics_minus1 u(8)  subpic_grid_col_width_minus1 u(v)   subpic_grid_row_height_minus1 u(v)  for( i = 0; i < NumSubPicGridRows; i++ )    for( j = 0; j <NumSubPicGridCols; j++ )     subpic_grid_idx[ i ][ j ] u(v)   for( i =0; i <= NumSubPics; i++ ) {    subpic_treated_as_pic_flag[ i ] u(1)   loop_filter_across_subpic_enabled_flag[ i ] u(1)   }  } ... }subpics_present_flag equal to 1 indicates that subpicture parameters arepresent in the present in the SPS RBSP syntax. subpics_present_flagequal to 0 indicates that subpicture parameters are not present in thepresent in the SPS RBSP syntax.

-   -   NOTE 2—When a bitstream is the result of a sub-bitstream        extraction process and contains only a subset of the subpictures        of the input bitstream to the sub-bitstream extraction process,        it might be required to set the value of subpics_present_flag        equal to 1 in the RBSP of the SPSs.        max_subpics_minus1 plus 1 specifies the maximum number of        subpictures that may be present in the CVS. max_subpics_minus1        shall be in the range of 0 to 254. The value of 255 is reserved        for future use by ITU-T|ISO/IEC.        subpic_grid_col_width_minus1 plus 1 specifies the width of each        element of the subpicture identifier grid in units of 4 samples.        The length of the syntax element is Ceil(Log        2(pic_width_max_in_luma_samples/4)) bits.

The variable NumSubPicGridCols is derived as follows:

NumSubPicGridCols=(pic_width_max_in_luma_samples+subpic_grid_col_width_minus1*4+3)/(subpic_grid_col_width_minus1*4+4)  (7-5)

subpic_grid_row_height_minus1 plus 1 specifies the height of eachelement of the subpicture identifier grid in units of 4 samples. Thelength of the syntax element is Ceil(Log2(pic_height_max_in_luma_samples/4)) bits.

The variable NumSubPicGridRows is derived as follows:

NumSubPicGridRows=(pic_height_max_in_luma_samples+subpic_grid_row_height_minus1*4+3)/(subpic_grid_row_height_minus1*4+4)  (7-6)

subpic_grid_idx[i][j] specifies the subpicture index of the gridposition (i, j). The length of the syntax element is Ceil(Log2(max_subpics_minus1+1)) bits.

The variables SubPicTop[subpic_grid_idx[i][j]],SubPicLeft[subpic_grid_idx[i][j]], SubPicWidth[subpic_grid_idx [i][j]],SubPicHeight[subpic_grid_idx[i][j]], and NumSubPics are derived asfollows:

  NumSubPics = 0 for( i = 0; i. < NumSubPicGridRows; i++ ) {       for(j = 0; j < NumSubPicGridCols; j++ ) {          if( i = = 0)      SubPicTop[ subpic_grid_idx[ i ][ j ] ] = 0           else  if( subpic_grid_idx[ i ][ j ]    !=    subpic_grid_idx[ i − 1 ][ j ]  )  {              SubPicTop[ subpic_grid_idx[ i ][ j ] ] = i      SubPicHeight[ subpic_grid_idx[ i − 1][ j ] ]   =   i − SubPicTop[subpic_grid_idx[ i − 1 ][ j ] ]           }           if( j = = 0)              SubPicLeft[ subpic_grid_idx[ i ][ j ] ] = 0           elseif (subpic_grid_idx[ i ][ j ] != subpic_grid_idx[ i ][ j − 1 ] ) {              SubPicLeft[ subpic_grid_idx[ i ][ j ] ] = j      SubPicWidth[ subpic_grid_idx[ i ][ j ] ] = j − SubPicLeft[subpic_grid_idx[ i ][ j − l ] ]           }           if ( i = =NumSubPicGridRows − 1)       SubPicHeight[ subpic_grid_idx[ i ][ j ] ] =i − SubPicTop[ subpic_grid_idx[ i − 1 ][ j ] ] + 1           if (j = =NumSubPicGridRows − 1)       SubPicWidth[ subpic_grid_idx[ i ][ j ] ]  =   j − SubPicLeft[ subpic_grid_idx[ i ][ j − 1 ] ] + 1           if(subpic_grid_idx[ i ][ j ] > NumSubPics)               NumSubPics =subpic_grid_idx[ i ][ j ]       } }subpic_treated_as_pic_flag[i] equal to 1 specifies that the i-thsubpicture of each coded picture in the CVS is treated as a picture inthe decoding process excluding in-loop filtering operations.subpic_treated_aspic_flag[i] equal to 0 specifies that the i-thsubpicture of each coded picture in the CVS is not treated as a picturein the decoding process excluding in-loop filtering operations. When notpresent, the value of subpic_treated_aspic_flag[i] is inferred to beequal to 0.loop_filter_across_subpic_enabled_flag[i] equal to 1 specifies thatin-loop filtering operations may be performed across the boundaries ofthe i-th subpicture in each coded picture in the CVS.loop_filter_across_subpic_enabled_flag[i] equal to 0 specifies thatin-loop filtering operations are not performed across the boundaries ofthe i-th subpicture in each coded picture in the CVS. When not present,the value of loop_filter_across_subpic_enabled_pic_flag[i] is inferredto be equal to 1.

It is a requirement of bitstream conformance that the followingconstraints apply:

-   -   For any two subpictures subpicA and subpicB, when the index of        subpicA is less than the index of subpicB, any coded NAL unit of        subPicA shall succeed any coded NAL unit of subPicB in decoding        order.    -   The shapes of the subpictures shall be such that each        subpicture, when decoded, shall have its entire left boundary        and entire top boundary consisting of picture boundaries or        consisting of boundaries of previously decoded subpictures.

The list CtbToSubPicIdx[ctbAddrRs] for ctbAddrRs ranging from 0 toPicSizeInCtbsY−1, inclusive, specifying the conversion from a CTBaddress in picture raster scan to a subpicture index, is derived asfollows:

  for(   ctbAddrRs   =   0;   ctbAddrRs   <   PicSizeInCtbsY;  ctbAddrRs++    )   {  posX = ctbAddrRs % PicWidthInCtbsY * CtbSizeY posY = ctbAddrRs / PicWidthInCtbsY * CtbSizeY  CtbToSubPicIdx[ctbAddrRs ] = −1  for(  i  =  0;  CtbToSubPicIdx[ ctbAddrRs ]  <  0   &&  i  <  NumSubPics;  i++  ) {   if(  (  posX   >=   SubPicLeft[ i ] * ( subpic_grid_col_width_minus1 + 1  ) * 4  )   &&        (    posX    <   (    SubPicLeft[ i ] + SubPicWidth[ i ]      ) *                    (subpic_grid_col_width_minus1 + 1 ) * 4 ) &&        (     posY          >=           SubPicTop[ i ] *                    (subpic_grid_row_height_minus1 + 1 ) * 4 ) &&        (    posY    <    (   SubPicTop[ i ] + SubPicHeight[ i ]    ) *                     (subpic_grid_row_height_minus1 + 1 ) * 4 ) )      CtbToSubPicIdx[ctbAddrRs ] = i  } }num_brcks_in_slice_minus1, when present, specifies the number of bricksin the slice minus 1. The value of num_bricks_in_slice_minus1 shall bein the range of 0 to NumBricksInPic−1, inclusive. When rect_slice_flagis equal to 0 and single_brick_per_slice_flag is equal to 1, the valueof num_bricks_in_slice_minus1 is inferred to be equal to 0. Whensingle_brick_per_slice_flag is equal to 1, the value ofnum_bricks_in_slice_minus1 is inferred to be equal to 0.

The variable NumBricksInCurrSlice, which specifies the number of bricksin the current slice, and SliceBrickIdx[i], which specifies the brickindex of the i-th brick in the current slice, are derived as follows:

  if(             rect_slice_flag             )            {  sliceIdx                    =                   0  while(      slice_address         !=         slice_id[ sliceIdx ]    )   sliceIdx++ NumBricksInCurrSlice          =            NumBricksInSlice[ sliceIdx ] brickIdx             =                TopLeftBrickIdx[ sliceIdx ]  for(bIdx = 0; brickIdx <= BottomRightBrickIdx[ sliceIdx ]; brickIdx++ )  if(     BricksToSliceMap[ brickIdx ]        = =         sliceIdx     )     SliceBrickIdx[ bIdx++ ]           =              brickIdx }                   else                      {  NumBricksInCurrSlice        =           num_bricks_in_slice_minus1 + 1  SliceBrickIdx[ 0 ]             =                slice_address  for(    i    =    1;    i   <    NumBricksInCurrSlice;     i++    )   SliceBrickIdx[ i ]      =      SliceBrickIdx[ i − 1 ]        +      1 }

The variables SubPicIdx, SubPicLeftBoundaryPos, SubPicTopBoundaryPos,SubPicRightBoundaryPos, and SubPicBotBoundaryPos are derived as follows:

  SubPicIdx = CtbToSubPicIdx[ CtbAddrBsToRs[ FirstCtbAddrBs[SliceBrickIdx[ 0 ] ] ] ] if( subpic_treated_as_pic_flag[ SubPicIdx ] ) {SubPicLeftBoundaryPos = SubPicLeft[ SubPicIdx ] * (subpic_grid_col_width_minus1 + 1 ) * 4 SubPicRightBoundaryPos       =      ( SubPicLeft[ SubPicIdx ] + SubPicWidth[ SubPicIdx ] ) *           ( subpic_grid_col_width_minus1 + 1 ) * 4 SubPicTopBoundaryPos    =     SubPicTop[ SubPicIdx ] * ( subpic_grid_row_height_minus1 + 1)* 4 SubPicBotBoundaryPos       =        ( SubPicTop[ SubPicIdx ] +SubPicHeight[ SubPicIdx ] ) *            (subpic_grid_row_height_minus1 + 1 ) * 4 } ...

Derivation Process for Temporal Luma Motion Vector Prediction

Inputs to this process are:

-   -   a luma location (xCb, yCb) of the top-left sample of the current        luma coding block relative to the top-left luma sample of the        current picture,    -   a variable cbWidth specifying the width of the current coding        block in luma samples,    -   a variable cbHeight specifying the height of the current coding        block in luma samples,    -   a reference index refIdxLX, with X being 0 or 1.

Outputs of this process are:

-   -   the motion vector prediction mvLXCol in 1/16 fractional-sample        accuracy,    -   the availability flag availableFlagLXCol.

The variable currCb specifies the current luma coding block at lumalocation (xCb, yCb).

The variables mvLXCol and availableFlagLXCol are derived as follows:

-   -   If slice_temporal_mvp_enabled_flag is equal to 0 or        (cbWidth*cbHeight) is less than or equal to 32, both components        of mvLXCol are set equal to 0 and availableFlagLXCol is set        equal to 0.    -   Otherwise (slice_temporal_mvp_enabled_flag is equal to 1), the        following ordered steps apply:    -   1. The bottom right collocated motion vector and the bottom and        right boundary sample locations are derived as follows:

xColBr=xCb+cbWidth  (8-421)

yColBr=yCb+cbHeight  (8-422)

rightBoundaryPos=subpic_treated_as_pic_flag[SubPicIdx]?SubPicRightBoundaryPos:pic_width_in_luma_samples−1  (8-423)

botBoundaryPos=subpic_treated_as_pic_flag[SubPicIdx]?SubPicBotBoundaryPos:pic_height_in_luma_samples−1  (8-424)

-   -   -   If yCb>>CtbLog 2SizeY is equal to yColBr>>CtbLog 2SizeY,            yColBr is less than or equal to botBoundaryPos and xColBr is            less than or equal to rightBoundaryPos, the following            applies:            -   The variable colCb specifies the luma coding block                covering the modified location given by ((xColBr>>3)<<3,                (yColBr>>3)<<3) inside the collocated picture specified                by ColPic.            -   The luma location (xColCb, yColCb) is set equal to the                top-left sample of the collocated luma coding block                specified by colCb relative to the top-left luma sample                of the collocated picture specified by ColPic.            -   The derivation process for collocated motion vectors as                specified in clause 8.5.2.12 is invoked with currCb,                colCb, (xColCb, yColCb), refIdxLX and sbFlag set equal                to 0 as inputs, and the output is assigned to mvLXCol                and availableFlagLXCol.

Otherwise, both components of mvLXCol are set equal to 0 andavailableFlagLXCol is set equal to 0.

. . .

Luma Sample Bilinear Interpolation Process

Inputs to this process are:

-   -   a luma location in full-sample units (xInt_(L), yInt_(L)),    -   a luma location in fractional-sample units (xFrac_(L),        yFrac_(L)),    -   the luma reference sample array refPicLX_(L).

Output of this process is a predicted luma sample value predSampleLX_(L)

The variables shift1, shift2, shift3, shift4, offset1, offset2 andoffset3 are derived as follows:

shift1=BitDepth_(Y)−6  (8-453)

offset1=1<<(shift1−1)  (8-454)

shift2=4  (8-455)

offset2=1<<(shift2−1)  (8-456)

shift3=10−BitDepth_(Y)  (8-457)

shift4=BitDepth_(Y)−10  (8-458)

offset4=1<<(shift4−1)  (8-459)

The variable picW is set equal to pic_width_in_luma_samples and thevariable picH is set equal to pic_height_in_luma_samples.

The luma interpolation filter coefficients fb_(L)[p] for each 1/16fractional sample position p equal to xFrac_(L) or yFrac_(L) arespecified in Table 8-10.

The luma locations in full-sample units (xInt_(i), yInt_(i)) are derivedas follows for i=0 . . . 1:

-   -   If subpic_treated_as_pic_flag[SubPicIdx] is equal to 1, the        following applies:

xInt_(i)=Clip3(SubPicLeftBoundaryPos,SubPicRightBoundaryPos,xInt_(L)+i)  (8-460)

yInt_(i)=Clip3(SubPicTopBoundaryPos,SubPicBotBoundaryPos,yInt_(L)+i)  (8-461)

-   -   Otherwise (subpic_treated_as_pic_flag[SubPicIdx] is equal to 0),        the following applies:

xInt_(i)=Clip3(0,picW−1,sps_ref_wraparound_enabled_flag?ClipH((sps_ref_wraparound_offset_minus1+1)*MinCbSizeY,picW,(xInt_(L)+i)):xInt_(L) +i)  (8-462)

yInt_(i)=Clip3(0,picH−1,yInt_(L) +i)  (8-463)

. . .

Derivation Process for Subblock-Based Temporal Merging Candidates

Inputs to this process are:

-   -   a luma location (xCb, yCb) of the top-left sample of the current        luma coding block relative to the top-left luma sample of the        current picture,    -   a variable cbWidth specifying the width of the current coding        block in luma samples,    -   a variable cbHeight specifying the height of the current coding        block in luma samples.    -   the availability flag availableFlagA₁ of the neighbouring coding        unit,    -   the reference index refIdxLXA₁ of the neighbouring coding unit        with X being 0 or 1,    -   the prediction list utilization flag predFlagLXA₁ of the        neighbouring coding unit with X being 0 or 1,    -   the motion vector in 1/16 fractional-sample accuracy mvLXA₁ of        the neighbouring coding unit with X being 0 or 1.

Outputs of this process are:

-   -   the availability flag availableFlagSbCol,    -   the number of luma coding subblocks in horizontal direction        numSbX and in vertical direction numSbY,    -   the reference indices refIdxL0SbCol and refIdxL1SbCol,    -   the luma motion vectors in 1/16 fractional-sample accuracy        mvL0SbCol[xSbIdx][ySbIdx] and mvL1SbCol[xSbIdx][ySbIdx] with        xSbIdx=0 . . . numSbX−1, ySbIdx=0 . . . numSbY−1,    -   the prediction list utilization flags        predFlagL0SbCol[xSbIdx][ySbIdx] and        predFlagL1SbCol[xSbIdx][ySbIdx] with xSbIdx=0 . . . numSbX−1,        ySbIdx=0 . . . numSbY−1.

The availability flag availableFlagSbCol is derived as follows.

-   -   If one or more of the following conditions is true,        availableFlagSbCol is set equal to 0.        -   slice_temporal_mvp_enabled_flag is equal to 0.        -   sps_sbtmvp_enabled_flag is equal to 0.        -   cbWidth is less than 8.        -   cbHeight is less than 8.    -   Otherwise, the following ordered steps apply:        -   1. The location (xCtb, yCtb) of the top-left sample of the            luma coding tree block that contains the current coding            block and the location (xCtr, yCtr) of the below-right            center sample of the current luma coding block are derived            as follows:

xCtb=(xCb>>Ctu Log 2Size)<<<Ctu Log 2Size  (8-542)

yCtb=(yCb>>Ctu Log 2Size)<<<Ctu Log 2Size  (8-543)

xCtr=xCb+(cbWidth/2)  (8-544)

yCtr=yCb+(cbHeight/2)  (8-545)

-   -   -   2. The luma location (xColCtrCb, yColCtrCb) is set equal to            the top-left sample of the collocated luma coding block            covering the location given by (xCtr, yCtr) inside ColPic            relative to the top-left luma sample of the collocated            picture specified by ColPic.        -   3. The derivation process for subblock-based temporal            merging base motion data as specified in clause 8.5.5.4 is            invoked with the location (xCtb, yCtb), the location            (xColCtrCb, yColCtrCb), the availability flag            availableFlagA₁, and the prediction list utilization flag            predFlagLXA₁, and the reference index refIdxLXA₁, and the            motion vector mvLXA₁, with X being 0 and 1 as inputs and the            motion vectors ctrMvLX, and the prediction list utilization            flags ctrPredFlagLX of the collocated block, with X being 0            and 1, and the temporal motion vector tempMv as outputs.        -   4. The variable availableFlagSbCol is derived as follows:            -   If both ctrPredFlagL0 and ctrPredFlagL1 are equal to 0,                availableFlagSbCol is set equal to 0.            -   Otherwise, availableFlagSbCol is set equal to 1.

When availableFlagSbCol is equal to 1, the following applies:

-   -   The variables numSbX, numSbY, sbWidth, sbHeight and        refIdxLXSbCol are derived as follows:

numSbX=cbWidth>>3  (8-546)

numSbY=cbHeight>>3  (8-547)

sbWidth=cbWidth/numSbX  (8-548)

sbHeight=cbHeight/numSbY  (8-549)

refIdxLXSbCol=0  (8-550)

-   -   For xSbIdx=0 . . . numSbX−1 and ySbIdx=0 . . . numSbY−1, the        motion vectors mvLXSbCol[xSbIdx][ySbIdx] and prediction list        utilization flags predFlagLXSbCol[xSbIdx][ySbIdx] are derived as        follows:        -   The luma location (xSb, ySb) specifying the top-left sample            of the current coding subblock relative to the top-left luma            sample of the current picture is derived as follows:

xSb=xCb+xSbIdx*sbWidth+sbWidth/2  (8-551)

ySb=yCb+ySbIdx*sbHeight+sbHeight/2  (8-552)

-   -   -   The location (xColSb, yColSb) of the collocated subblock            inside ColPic is derived as follows.            -   The following applies:

yColSb=Clip3(yCtb,Min(CurPicHeightInSamplesY−1,yCtb+(1<<CtbLog2SizeY)−1),ySb+(tempMv[1]>>4))  (8-553)

-   -   -   -   If subpic_treated_as_pic_flag[SubPicIdx] is equal to 1,                the following applies:

xColSb=Clip3(xCtb,Min(SubPicRightBoundaryPos,xCtb+(1<<CtbLog2SizeY)+3),xSb+(tempMv[0]>>4))  (8-554)

-   -   -   -   Otherwise (subpic_treated_as_pic_flag[SubPicIdx] is                equal to 0), the following applies:

xColSb=Clip3(xCtb,Min(CurPicWidthInSamplesY−1,xCtb+(1<<CtbLog2SizeY)+3),xSb+(tempMv[0]>>4))  (8-555)

. . .

Derivation Process for Subblock-Based Temporal Merging Base Motion Data

Inputs to this process are:

-   -   the location (xCtb, yCtb) of the top-left sample of the luma        coding tree block that contains the current coding block,    -   the location (xColCtrCb, yColCtrCb) of the top-left sample of        the collocated luma coding block that covers the below-right        center sample.    -   the availability flag availableFlagA₁ of the neighbouring coding        unit,    -   the reference index refIdxLXA₁ of the neighbouring coding unit,    -   the prediction list utilization flag predFlagLXA₁ of the        neighbouring coding unit,    -   the motion vector in 1/16 fractional-sample accuracy mvLXA₁ of        the neighbouring coding unit.

Outputs of this process are:

-   -   the motion vectors ctrMvL0 and ctrMvL1,    -   the prediction list utilization flags ctrPredFlagL0 and        ctrPredFlagL1,    -   the temporal motion vector tempMv.

The variable tempMv is set as follows:

tempMv[0]=0  (8-558)

tempMv[1]=0  (8-559)

The variable currPic specifies the current picture.

When availableFlagA₁ is equal to TRUE, the following applies:

-   -   If all of the following conditions are true, tempMv is set equal        to mvL0A₁:        -   predFlagL0A₁ is equal to 1,        -   DiffPicOrderCnt(ColPic, RefPicList[0][refIdxL0A₁]) is equal            to 0,    -   Otherwise, if all of the following conditions are true, tempMv        is set equal to mvL1A₁:        -   slice_type is equal to B,        -   predFlagL1A₁ is equal to 1,        -   DiffPicOrderCnt(ColPic, RefPicList[1][refIdxL1A₁]) is equal            to 0.

The location (xColCb, yColCb) of the collocated block inside ColPic isderived as follows.

-   -   The following applies:

yColCb=Clip3(yCtb,Min(CurPicHeightInSamplesY−1,yCtb+(1<<CtbLog2SizeY)−1),yColCtrCb+(tempMv[1]>>4))  (8-560)

-   -   If subpic_treated_as_pic_flag[SubPicIdx] is equal to 1, the        following applies:

xColCb=Clip3(xCtb,Min(SubPicRightBoundaryPos,xCtb+(1<<CtbLog2SizeY)+3),xColCtrCb+(tempMv[0]>>4))  (8-561)

-   -   Otherwise (subpic_treated_as_pic_flag[SubPicIdx] is equal to o,        the following applies:

xColCb=Clip3(xCtb,Min(CurPicWidthInSamplesY−1,xCtb+(1<<CtbLog2SizeY)+3),xColCtrCb+(tempMv[0]>>4))  (8-562)

. . .

Luma Sample Interpolation Filtering Process

Inputs to this process are:

-   -   a luma location in full-sample units (xInt_(L), yInt_(L)),    -   a luma location in fractional-sample units (xFrac_(L),        yFrac_(L)),    -   a luma location in full-sample units (xSbInt_(L), ySbInt_(L))        specifying the top-left sample of the bounding block for        reference sample padding relative to the top-left luma sample of        the reference picture,    -   the luma reference sample array refPicLX_(L),    -   the half sample interpolation filter index hpelIfIdx,    -   a variable sbWidth specifying the width of the current subblock,    -   a variable sbHeight specifying the height of the current        subblock,    -   a luma location (xSb, ySb) specifying the top-left sample of the        current subblock relative to the top-left luma sample of the        current picture,

Output of this process is a predicted luma sample value predSampleLX_(L)

The variables shift1, shift2 and shift3 are derived as follows:

-   -   The variable shift1 is set equal to Min(4, BitDepth_(Y)−8), the        variable shift2 is set equal to 6 and the variable shift3 is set        equal to Max(2, 14−BitDepth_(Y)).    -   The variable picW is set equal to pic_width_in_luma_samples and        the variable picH is set equal to pic_height_in_luma_samples.

The luma interpolation filter coefficients f_(L)[p] for each 1/16fractional sample position p equal to xFrac_(L) or yFrac_(L) are derivedas follows:

-   -   If MotionModelIdc[xSb][ySb] is greater than 0, and sbWidth and        sbHeight are both equal to 4, the luma interpolation filter        coefficients f_(L)[p] are specified in Table 8-12.    -   Otherwise, the luma interpolation filter coefficients f_(L)[p]        are specified in Table 8-11 depending on hpelIfIdx.

The luma locations in full-sample units (xInt_(i), yInt_(i)) are derivedas follows for i=0 . . . 7:

-   -   If subpic_treated_as_pic_flag[SubPicIdx] is equal to 1, the        following applies:

xInt_(i)=Clip3(SubPicLeftBoundaryPos,SubPicRightBoundaryPos,xInt_(L)+i−3)  (8-771)

yInt_(i)=Clip3(SubPicTopBoundaryPos,SubPicBotBoundaryPos,yInt_(L)+i−3)  (8-772)

-   -   Otherwise (subpic_treated_as_pic_flag[SubPicIdx] is equal to 0),        the following applies:

xInt_(i)=Clip3(0,picW−1,sps_ref_wraparound_enabled_flag?ClipH((sps_ref_wraparound_offset_minus1+1)*MinCbSizeY,picW,xInt_(L)+i−3):xInt_(L) +i−3)  (8-773)

yInt_(i)=Clip3(0,picH−1,yInt_(L) +i−3)  (8-774)

. . .

Chroma Sample Interpolation Process

Inputs to this process are:

-   -   a chroma location in full-sample units (xInt_(C), yInt_(C)),    -   a chroma location in 1/32 fractional-sample units (xFrac_(C),        yFrac_(C)),    -   a chroma location in full-sample units (xSbIntC, ySbIntC)        specifying the top-left sample of the bounding block for        reference sample padding relative to the top-left chroma sample        of the reference picture,    -   a variable sbWidth specifying the width of the current subblock,    -   a variable sbHeight specifying the height of the current        subblock,    -   the chroma reference sample array refPicLX_(C).

Output of this process is a predicted chroma sample valuepredSampleLX_(C) The variables shift1, shift2 and shift3 are derived asfollows:

-   -   The variable shift1 is set equal to Min(4, BitDepth_(C)−8), the        variable shift2 is set equal to 6 and the variable shift3 is set        equal to Max(2, 14−BitDepth_(C)).    -   The variable picW_(C) is set equal to        pic_width_in_luma_samples/SubWidthC and the variable picH_(C) is        set equal to pic_height_in_luma_samples/SubHeightC.

The chroma interpolation filter coefficients fc[p] for each 1/32fractional sample position p equal to xFrac_(c) or yFrac_(c) arespecified in Table 8-13.

The variable xOffset is set equal to(sps_ref_wraparound_offset_minus1+1)*MinCbSizeY)/SubWidthC.

The chroma locations in full-sample units (xInt_(i), yInt_(i)) arederived as follows for i=0 . . . 3:

-   -   If subpic_treated_as_pic_flag[SubPicIdx] is equal to 1, the        following applies:

xInt_(i)=Clip3(SubPicLeftBoundaryPos/SubWidthC,SubPicRightBoundaryPos/SubWidthC,xInt_(L)+i)   (8-785)

yInt_(i)=Clip3(SubPicTopBoundaryPos/SubHeightC,SubPicBotBoundaryPos/SubHeightC,yInt_(L)+i)  (8-786)

-   -   Otherwise (subpic_treated_as_pic_flag[SubPicIdx] is equal to 0),        the following applies:

xInt_(i)=Clip3(0,picW_(C)−1,sps_ref_wraparound_enabled_flag?ClipH(xOffset,picW _(C) ,xInt_(C)+i−1):xInt_(C) +i−1)  (8-787)

yInt_(i)=Clip3(0,picH _(C)−1,yInt_(C) +i−1)  (8-788)

2.4 Example Encoder-Only GOP-Based Temporal Filter

In some embodiments, an encoder-only temporal filter can be implemented.The filtering is done at the encoder side as a pre-processing step.Source pictures before and after the selected picture to encode are readand a block based motion compensation method relative to the selectedpicture is applied on those source pictures. Samples in the selectedpicture are temporally filtered using sample values after motioncompensation.

The overall filter strength is set depending on the temporal sub layerof the selected picture as well as the QP. Only pictures at temporal sublayers 0 and 1 are filtered and pictures of layer 0 are filter by astronger filter than pictures of layer 1. The per sample filter strengthis adjusted depending on the difference between the sample value in theselected picture and the co-located samples in motion compensatedpictures so that small differences between a motion compensated pictureand the selected picture are filtered more strongly than largerdifferences.

GOP Based Temporal Filter

A temporal filter is introduced directly after reading picture andbefore encoding. Below are the steps described in more detail.

Operation 1: Pictures are read by the encoder

Operation 2: If a picture is low enough in the coding hierarchy, it isfiltered before encoding. Otherwise the picture is encoded withoutfiltering. RA pictures with POC % 8==0 are filtered as well as LDpictures with POC % 4==0. AI pictures are never filtered.

The overall filter strength, s_(o), is set according to the equationbelow for RA.

${s_{o}(n)} = \{ \begin{matrix}{1.5,{{n\mspace{14mu}{mod}\mspace{9mu} 16} = 0}} \\{0.95,{{n\mspace{14mu}{mod}\mspace{9mu} 16} \neq 0}}\end{matrix} $

where n is the number of pictures read.

For the LD case, s_(o)(n)=0.95 is used.

Operation 3: Two pictures before and/or after the selected picture(referred to as original picture further down) are read. In the edgecases e.g. if is the first picture or close to the last picture, onlythe available pictures are read.

Operation 4: Motion of the read pictures before and after, relative tothe original picture is estimated per 8×8 picture block.

A hierarchical motion estimation scheme is used and the layers L0, L1and L2, are illustrated in FIG. 2. Subsampled pictures are generated byaveraging each 2×2 block for all read pictures and the original picture,e.g. L1 in FIG. 1. L2 is derived from L1 using the same subsamplingmethod.

FIG. 2 shows examples of different layers of the hierarchical motionestimation. L0 is the original resolution. L1 is a subsampled version ofL0. L2 is a subsampled version of L1.

First, motion estimation is done for each 16×16 block in L2. The squareddifference is calculated for each selected motion vector and the motionvector corresponding to the smallest difference is selected. Theselected motion vector is then used as initial value when estimating themotion in L1. Then the same is done for estimating motion in L0. As afinal step, subpixel motion is estimated for each 8×8 block by using aninterpolation filter on L0.

The VTM 6-tap interpolation filter can used:

 0: 0,   0, 64, 0,   0, 0  1: 1,  −3, 64, 4,  −2, 0  2: 1,  −6, 62, 9, −3, 1  3: 2,  −8, 60, 14,  −5, 1  4: 2,  −9, 57, 19,  −7, 2  5: 3, −10,53, 24,  −8, 2  6: 3, −11, 50, 29,  −9, 2  7: 3, −11, 44, 35, −10, 3  8:1,  −7, 38, 38,  −7, 1  9: 3, −10, 35, 44, −11, 3 10: 2,  −9, 29, 50,−11, 3 11: 2,  −8, 24, 53, −10, 3 12: 2,  −7, 19, 57,  −9, 2 13: 1,  −5,14, 60,  −8, 2 14: 1,  −3,  9, 62,  −6, 1 15: 0,  −2,  4, 64,  −3, 1

Operation 5: Motion compensation is applied on the pictures before andafter the original picture according to the best matching motion foreach block, e.g., so that the sample coordinates of the original picturein each block have the best matching coordinates in the referencedpictures.

Operation 6: The samples of the processed one by one for the luma andchroma channels as described in the following steps.

Operation 7: The new sample value, I_(n), is calculated using thefollowing formula.

$\begin{matrix}{I_{n} = \frac{I_{o} + {\sum_{i = 0}^{3}{{w_{r}( {i,a} )}{I_{r}(i)}}}}{1 + {\sum_{i = 0}^{3}{w_{r}( {i,a} )}}}} & \;\end{matrix}$

Where I_(o) is the sample value of the original sample, I_(r)(i) is theintensity of the corresponding sample of motion compensated picture iand w_(r)(i, a) is the weight of motion compensated picture i when thenumber of available motion compensated pictures is a.

In the luma channel, the weights, w_(r)(i, a), is defined as follows:

$\begin{matrix}{{w_{r}( {i,a} )} = {s_{\iota}{s_{o}(n)}{s_{r}( {i,a} )}e^{- \frac{\Delta\;{I{(i)}}^{2}}{2{\sigma_{l}{({QP})}}^{2}}}}} & \;\end{matrix}$

Where

s_(l) = 0.4 ${s_{r}( {i,2} )} = \{ {{\begin{matrix}{1.2,{i = 0}} \\{1.0,{i = 1}}\end{matrix}{s_{r}( {i,4} )}} = \{ \begin{matrix}{0.60,{i = 0}} \\{0.85,{i = 1}} \\{0.85,{i = 2}} \\{0.60,{i = 3}}\end{matrix} } $

For all other cases of i, and a: s_(r)(i, a)=0.3

$\begin{matrix}{{{\sigma_{l}( {QP} )} = {3*( {{QP} - {10}} )}}{{\Delta\;{I(i)}} = {{I_{r}(i)} - I_{o}}}} & \;\end{matrix}$

For the chroma channels, the weights, w_(r)(i, a), is defined asfollows:

$\begin{matrix}{{w_{r}( {i,a} )} = {s_{c}{s_{o}(n)}{s_{r}( {i,a} )}e^{- \frac{\Delta\;{I{(i)}}^{2}}{2\sigma_{c}^{2}}}}} & \;\end{matrix}$

Where s_(c)=0.55 and σ_(c)=30

Operation 8: The filter is applied for the current sample. The resultingsample value is stored separately.

Operation 9: The filtered picture is encoded.

3. Examples of Technical Problems Solved by Disclosed Embodiments

(1) There are some designs that can violate the sub-picture constrain.

-   -   A. TMVP in the affine constructed candidates may fetch a MV in        the collocated picture out of the range of the current        sub-picture.    -   B. When deriving gradients in Bi-Directional Optical Flow (BDOF)        and Prediction Refinement Optical Flow (PROF), two extended rows        and two extended columns of integer reference samples are        required to be fetched. These reference samples may be out of        the range of the current sub-picture.    -   C. When deriving the chroma residual scaling factor in luma        mapping chroma scaling (LMCS), the accessed reconstructed luma        samples may be out of the range of the range of the current        sub-picture.    -   D. The neighboring block may be out of the range of the current        sub-picture, when deriving the luma intra prediction mode,        reference samples for intra prediction, reference samples for        CCLM, neighboring block availability for spatial neighboring        candidates for merge/AMVP/CIIP/IBC/LMCS, quantization        parameters, CABAC initialization process, ctxInc derivation        using left and above syntax elements, and ctxInc for the syntax        element mtt_split_cu_vertical_flag. The representation of        subpicture may lead to subpicture with incomplete CTUs. The CTU        partitions and CU splitting process may need to consider        incomplete CTUs.

(2) The signaled syntax elements related to sub-picture may bearbitrarily large, which may cause an overflow problem.

(3) The representation of sub-pictures may lead to non-rectangularsub-pictures.

(4) Currently the subpicture and subpicture grid is defined in units of4 samples. And the length of syntax element is dependent on the pictureheight divided by 4. However, since the currentpic_width_in_luma_samples and pic_height_in_luma_samples shall be aninteger multiple of Max(8, MinCbSizeY), the subpicture grid may need tobe defined in units of 8 samples.

(5) The SPS syntax, pic_width_max_in_luma_samples andpic_height_max_in_luma_samples may need to be restricted to be nosmaller than 8.

(6) Interaction between reference picture resampling/scalability andsubpicture is not considered in the current design.

(7) In temporal filtering, samples across different sub-pictures may berequired.

4. Example Techniques and Embodiments

The detailed listing below should be considered as examples to explaingeneral concepts. These items should not be interpreted in a narrow way.Furthermore, these items can be combined in any manner. Hereinafter,temporal filter is used to represent filters that require samples inother pictures. Max(x, y) returns the larger one of x and y. Min(x, y)returns the smaller one of x and y.

-   -   1. The position (named position RB) at which a temporal MV        predictor is fetched in a picture to generate affine motion        candidates (e.g. a constructed affine merge candidate) must be        in a required sub-picture, assuming the top-left corner        coordinate of the required sub-picture is (xTL, yTL) and        bottom-right coordinate of the required sub-picture is (xBR,        yBR).        -   a. In one example, the required sub-picture is the            sub-picture covering the current block.        -   b. In one example, if position RB with a coordinate (x, y)            is out of the required sub-picture, the temporal MV            predictor is treated as unavailable.            -   i. In one example, position RB is out of the required                sub-picture if x>xBR.            -   ii. In one example, position RB is out of the required                sub-picture if y>yBR.            -   iii. In one example, position RB is out of the required                sub-picture if x<xTL.            -   iv. In one example, position RB is out of the required                sub-picture if y<yTL.        -   c. In one example, position RB, if outside of the required            sub-picture, a replacement of RB is utilized.            -   i. Alternatively, furthermore, the replacement position                shall be in the required sub-picture.        -   d. In one example, position RB is clipped to be in the            required sub-picture.            -   i. In one example, x is clipped as x=Min(x, xBR).            -   ii. In one example, y is clipped as y=Min(y, yBR).            -   iii. In one example, x is clipped as x=Max(x, xTL).            -   iv. In one example, y is clipped as y=Max(y, yTL).        -   e. In one example, the position RB may be the bottom right            position inside the corresponding block of current block in            the collocated picture.        -   f. The proposed method may be utilized in other coding tools            which require to access motion information from a picture            different than the current picture.        -   g. In one example, whether the above methods are applied            (e.g., position RB must be in a required sub-picture (e.g.            to do as claimed in 1.a and/or 1.b)) may depend on one or            more syntax elements signaled in VPS/DPS/SPS/PPS/APS/slice            header/tile group header. For example, the syntax element            may be subpic_treated_as_pic_flag[SubPicIdx], where            SubPicIdx is the sub-picture index of sub-picture covering            the current block.    -   2. The position (named position S) at which an integer sample is        fetched in a reference not used in the interpolation process        must be in a required sub-picture, assuming the top-left corner        coordinate of the required sub-picture is (xTL, yTL) and the        bottom-right coordinate of the required sub-picture is (xBR,        yBR).        -   a. In one example, the required sub-picture is the            sub-picture covering the current block.        -   b. In one example, if position S with a coordinate (x, y) is            out of the required sub-picture, the reference sample is            treated as unavailable.            -   i. In one example, position S is out of the required                sub-picture if x>xBR.            -   ii. In one example, position S is out of the required                sub-picture if y>yBR.            -   iii. In one example, position S is out of the required                sub-picture if x<xTL.            -   iv. In one example, position S is out of the required                sub-picture if y<yTL.        -   c. In one example, position S is clipped to be in the            required sub-picture.            -   i. In one example, x is clipped as x=Min(x, xBR).            -   ii. In one example, y is clipped as y=Min(y, yBR).            -   iii. In one example, x is clipped as x=Max(x, xTL).            -   iv. In one example, y is clipped as y=Max(y, yTL).        -   d. In one example, whether position S must be in a required            sub-picture (e.g. to do as claimed in 2.a and/or 2.b) may            depend on one or more syntax elements signaled in            VPS/DPS/SPS/PPS/APS/slice header/tile group header. For            example, the syntax element may be            subpic_treated_as_pic_flag[SubPicIdx], where SubPicIdx is            the sub-picture index of sub-picture covering the current            block.        -   e. In one example, the fetched integer sample is used to            generate gradients in BDOF and/or PORF.    -   3. The position (named position R) at which the reconstructed        luma sample value is fetched may be in a required sub-picture,        assuming the top-left corner coordinate of the required        sub-picture is (xTL, yTL) and the bottom-right coordinate of the        required sub-picture is (xBR, yBR).        -   a. In one example, the required sub-picture is the            sub-picture covering the current block.        -   b. In one example, if position R with a coordinate (x, y) is            out of the required sub-picture, the reference sample is            treated as unavailable.            -   i. In one example, position R is out of the required                sub-picture if x>xBR.            -   ii. In one example, position R is out of the required                sub-picture if y>yBR.            -   iii. In one example, position R is out of the required                sub-picture if x<xTL.            -   iv. In one example, position R is out of the required                sub-picture if y<yTL.        -   c. In one example, position R is clipped to be in the            required sub-picture.            -   i. In one example, x is clipped as x=Min(x, xBR).            -   ii. In one example, y is clipped as y=Min(y, yBR).            -   iii. In one example, x is clipped as x=Max(x, xTL).            -   iv. In one example, y is clipped as y=Max(y, yTL).        -   d. In one example, whether position R must be in a required            sub-picture (e.g. to do as claimed in 4.a and/or 4.b) may            depend on one or more syntax elements signaled in            VPS/DPS/SPS/PPS/APS/slice header/tile group header. For            example, the syntax element may be            subpic_treated_as_pic_flag[SubPicIdx], where SubPicIdx is            the sub-picture index of sub-picture covering the current            block.        -   e. In one example, the fetched luma sample is used to derive            the scaling factor for the chroma component(s) in LMCS.    -   4. The position (named position N) at which the picture boundary        check for BT/TT/QT splitting, BT/TT/QT depth derivation, and/or        the signaling of CU split flag must be in a required        sub-picture, assuming the top-left corner coordinate of the        required sub-picture is (xTL, yTL) and the bottom-right        coordinate of the required sub-picture is (xBR, yBR).        -   a. In one example, the required sub-picture is the            sub-picture covering the current block.        -   b. In one example, if position N with a coordinate (x, y) is            out of the required sub-picture, the reference sample is            treated as unavailable.            -   i. In one example, position N is out of the required                sub-picture if x>xBR.            -   ii. In one example, position N is out of the required                sub-picture if y>yBR.            -   iii. In one example, position N is out of the required                sub-picture if x<xTL.            -   iv. In one example, position N is out of the required                sub-picture if y<yTL.        -   c. In one example, position N is clipped to be in the            required sub-picture.            -   i. In one example, x is clipped as x=Min(x, xBR).            -   ii. In one example, y is clipped as y=Min(y, yBR).            -   iii. In one example, x is clipped as x=Max(x, xTL).        -   d. In one example, y is clipped as y=Max(y, yTL). In one            example, whether position N must be in a required            sub-picture (e.g. to do as claimed in 5.a and/or 5.b) may            depend on one or more syntax elements signaled in            VPS/DPS/SPS/PPS/APS/slice header/tile group header. For            example, the syntax element may be            subpic_treated_as_pic_flag[SubPicIdx], where SubPicIdx is            the sub-picture index of sub-picture covering the current            block.    -   5. History-based Motion Vector Prediction (HMVP) table may be        reset before decoding a new sub-picture in one picture.        -   a. In one example, the HMVP table used for IBC coding may be            reset        -   b. In one example, the HMVP table used for inter coding may            be reset        -   c. In one example, the HMVP table used for intra coding may            be reset    -   6. The subpicture syntax elements may be defined in units of N        (such as N=8, 32, and etc) samples.        -   a. In one example, the width of each element of the            subpicture identifier grid in units of N samples.        -   b. In one example, the height of each element of the            subpicture identifier grid in units of N samples.        -   c. In one example, N is set to the width and/or height of            CTU.    -   7. The syntax element of picture width and picture height may be        restricted to be no smaller than K (K>=8).        -   a. In one example, the picture width may need to be            restricted to be no smaller than 8.        -   b. In one example, the picture height may need to be            restricted to be no smaller than 8.    -   8. A conformance bitstream shall satisfy that sub-picture coding        and Adaptive resolution conversion (ARC)/Dynamic resolution        conversion (DRC)/Reference picture resampling (RPR) are        disallowed to be enabled for one video unit (e.g., sequence).        -   a. In one example, signaling of enabling sub-picture coding            may be under the conditions of disallowing ARC/DRC/RPR.            -   i. In one example, when subpicture is enabled, such as                subpics_present_flag equal to 1,                pic_width_in_luma_samples for all pictures for which                this SPS is active is equal to max                width_in_luma_samples.        -   b. Alternatively, sub-picture coding and ARC/DRC/RPR may be            both enabled for one video unit (e.g., sequence).            -   i. In one example, a conformance bitstream shall satisfy                that the donwsampled sub-picture due to ARC/DRC/RPR                shall still be in the form of K CTUs in width and M CTUs                in height wherein K and M are both integers.            -   ii. In one example, a conformance bitstream shall                satisfy that for sub-pictures not located at picture                boundaries (e.g., right boundary and/or bottom                boundary), the donwsampled sub-picture due to                ARC/DRC/RPR shall still be in the form of K CTUs in                width and M CTUs in height wherein K and M are both                integers.            -   iii. In one example, CTU sizes may be adaptively changed                based on the picture resolution.                -   1) In one example, a max CTU size may be signaled in                    SPS. For each picture with less resolution, the CTU                    size may be changed accordingly based on the reduced                    resolution.                -   2) In one example, CTU size may be signaled in SPS                    and PPS, and/or sub-picture level.    -   9. The syntax element subpic_grid_col_width_minus1 and        subpic_grid_row_height_minus1 may be constrained.        -   a. In one example, subpic_grid_col_width_minus1 must be no            larger (or must be smaller) than T1.        -   b. In one example, subpic_grid_row_height_minus1 must be no            larger (or must be smaller) than T2.        -   c. In one example, in a conformance bit-stream,            subpic_grid_col_width_minus1 and/or            subpic_grid_row_height_minus1 must follow the constraint            such as bullet 3.a or 3.b.        -   d. In one example, T1 in 3.a and/or T2 in 3.b may depend on            profiles/levels/tiers of a video coding standard.        -   e. In one example, T1 in 3.a may depend on the picture            width.            -   i. For example, T1 is equal to                pic_width_max_in_luma_samples/4 or                pic_width_max_in_luma_samples/4+Off. Off may be 1, 2,                −1, −2, etc.        -   f. In one example, T2 in 3.b may depend on the picture            width.            -   i. For example, T2 is equal to                pic_height_max_in_luma_samples/4 or                pic_height_max_in_luma_samples/4-1+Off. Off may be 1, 2,                −1, −2, etc.    -   10. It is constrained that a boundary between two sub-pictures        must be a boundary between two CTUs.        -   a. In other words, a CTU cannot be covered by more than one            sub-picture.        -   b. In one example, the unit of subpic_grid_col_width_minus1            may be the CTU width (such as 32, 64, 128), instead of 4 as            in VVC. The sub-picture grid width should be            (subpic_grid_col_width_minus1+1)*CTU width.        -   c. In one example, the unit of subpic_grid_col_height_minus1            may be the CTU height (such as 32, 64, 128), instead of 4 as            in VVC. The sub-picture grid height should be            (subpic_grid_col_height_minus1+1)*CTU height.        -   d. In one example, in a conformance bit-stream, the            constraint must be satisfied if the sub-picture approach is            applied.    -   11. It is constrained that the shape of a sub-picture must be        rectangular.        -   a. In one example, in a conformance bit-stream, the            constraint must be satisfied if the sub-picture approach is            applied.        -   b. Sub-picture may only contain rectangular slices. For            example, in a conformance bit-stream, the constraint must be            satisfied if the sub-picture approach is applied.    -   12. It is constrained that two sub-pictures cannot be        overlapped.        -   a. In one example, in a conformance bit-stream, the            constraint must be satisfied if the sub-picture approach is            applied.        -   b. Alternatively, two sub-pictures may be overlapped with            each other.    -   13. It is constrained that any position in the picture must be        covered by one and only one sub-picture.        -   a. In one example, in a conformance bit-stream, the            constraint must be satisfied if the sub-picture approach is            applied.        -   b. Alternatively, one sample may not belong to any            sub-picture.        -   c. Alternatively, one sample may belong to more than one            sub-pictures.    -   14. It may be constrained that sub-pictures defined in a SPS        mapped to every resolution presented in the same sequence should        obey the location and/or size constrained mentioned above.        -   a. In one example, the width and height of a sub-picture            defined in the SPS mapped to a resolution presented in the            same sequence, should be integer multiple times of N (such            as 8, 16, 32) luma samples.        -   b. In one example, sub-pictures may be defined for certain            layer and may be mapped to other layers.            -   i. For example, sub-pictures may be defined for the                layer with the highest resolution in the sequence.            -   ii. For example, sub-pictures may be defined for the                layer with the lowest resolution in the sequence.            -   iii. Which layer the sub-pictures are defined for may be                signaled in SPS/VPS/PPS/slice header.        -   c. In one example, when sub-pictures and different            resolutions are both applied, all resolutions (e.g., width            or/and height) may be integer multiple of a given            resolution.        -   d. In one example, the width and/or height of a sub-picture            defined in the SPS may be integer multiple times (e.g., M)            of the CTU size.        -   e. Alternatively, sub-pictures and different resolutions in            a sequence may not be allowed simultaneously.    -   15. Sub-pictures may only apply to a certain layer(s)        -   a. In one example, sub-pictures defined in a SPS may only            apply to the layer with the highest resolution in a            sequence.        -   b. In one example, sub-pictures defined in a SPS may only            apply to the layer with the lowest temporal id in a            sequence.        -   c. Which layer(s) that sub-pictures may be applied to may be            indicated by one or multiple syntax elements in SPS/VPS/PPS.        -   d. Which layer(s) that sub-picture cannot be applied to may            be indicated by one or multiple syntax elements in            SPS/VPS/PPS.    -   16. In one example, the position and/or dimensions of a        sub-picture may be signaled without using subpic_grid_idx.        -   a. In one example, the top-left position of a sub-picture            may be signaled.        -   b. In one example, the bottom-right position of a            sub-picture may be signaled.        -   c. In one example, the width of sub-picture may be signaled.        -   d. In one example, the height of a sub-picture may be            signaled.    -   17. For temporal filter, when performing the temporal filtering        of a sample, only samples within the same sub-picture that the        current sample belongs to may be used. The required samples may        be in the same picture that the current sample belongs to or in        other pictures.    -   18. In one example, whether to and/or how to apply a        partitioning method (such as QT, horizontal BT, vertical BT,        horizontal TT, vertical TT, or not split, etc.) may depend on        whether the current block (or partition) crosses one or multiple        boundary of a sub-picture.        -   a. In one example, the picture boundary handling method for            partitioning in VVC may also be applied when a picture            boundary is replaced by a sub-picture boundary.        -   b. In one example, whether to parse a syntax element (e.g. a            flag) which represents a partitioning method (such as QT,            horizontal BT, vertical BT, horizontal TT, vertical TT, or            not split, etc.) may depend on whether the current block (or            partition) crosses one or multiple boundary of a            sub-picture.    -   19. Instead of splitting one picture into multiple sub-pictures        with independent coding of each sub-picture, it is proposed to        split a picture into at least two sets of sub-regions, with the        first set including multiple sub-pictures and the second set        including all the remaining samples.        -   a. In one example, a sample in the second set is not in any            sub-pictures.        -   b. Alternatively, furthermore, the second set may be            encoded/decoded based on the information of the first set.        -   c. In one example, a default value may be utilized to mark            whether a sample/M×K sub-region belonging to the second set.            -   i. In one example, the default value may be set equal to                (max_subpics_minus1+K) wherein K is an integer greater                than 1.            -   ii. The default value may be assigned to                subpic_grid_idx[i][j] to indicate that grid belongs to                the second set.    -   20. It is proposed that the syntax element subpic_grid_idx[i][j]        cannot be larger than max_subpics_minus1.        -   a. For example, it is constrained that in a conformance            bit-stream, subpic_grid_idx[i][j] cannot be larger than            max_subpics_minus1.        -   b. For example, the codeword to code subpic_grid_idx[i][j]            cannot be larger than max_subpics_minus1.    -   21. It is proposed that, any integer number from 0 to        max_subpics_minus1 must be equal to at least one        subpic_grid_idx[i][j].    -   22. IBC virtual buffer may be reset before decoding a new        sub-picture in one picture.        -   a. In one example, all the samples in the IBC virtual buffer            may be reset to −1.    -   23. Palette entry list may be reset before decoding a new        sub-picture in one picture.        -   a. In one example, PredictorPaletteSize may be set equal to            0 before decoding a new sub-picture in one picture.

5. Embodiments

In the following embodiments, the newly added texts are bold italicizedand the deleted texts are marked by “[[ ]]”.

5.1 Embodiment 1: Sub-Picture Constraint on Affine Constructed MergeCandidates 8.5.5.6 Derivation Process for Constructed Affine ControlPoint Motion Vector Merging Candidates

Inputs to this process are:

-   -   a luma location (xCb, yCb) specifying the top-left sample of the        current luma coding block relative to the top-left luma sample        of the current picture,    -   two variables cbWidth and cbHeight specifying the width and the        height of the current luma coding block,    -   the availability flags availableA₀, availableA₁, availableA₂,        availableB₀, availableB₁, availableB₂, availableB₃,    -   the sample locations (xNbA₀, yNbA₀), (xNbA₁, yNbA₁), (xNbA₂,        yNbA₂), (xNbB₀, yNbB₀), (xNbB₁, yNbB₁), (xNbB₂, yNbB₂) and        (xNbB₃, yNbB₃).

Output of this process are:

-   -   the availability flag of the constructed affine control point        motion vector merging candidates availableFlagConstK, with K=1 .        . . 6,    -   the reference indices refIdxLXConstK, with K=1 . . . 6, X being        0 or 1,    -   the prediction list utilization flags predFlagLXConstK, with K=1        . . . 6, X being 0 or 1,    -   the affine motion model indices motionModelIdcConstK, with K=1 .        . . 6,    -   the bi-prediction weight indices bcwIdxConstK, with K=1 . . . 6,    -   the constructed affine control point motion vectors        cpMvLXConstK[cpIdx] with cpIdx=0 . . . 2, K=1 . . . 6 and X        being 0 or 1.

. . .

The fourth (collocated bottom-right) control point motion vectorcpMvLXCorner[3], reference index refIdxLXCorner[3], prediction listutilization flag predFlagLXCorner[3] and the availability flagavailableFlagCorner[3] with X being 0 and 1 are derived as follows:

-   -   The reference indices for the temporal merging candidate,        refIdxLXCorner[3], with X being 0 or 1, are set equal to 0.    -   The variables mvLXCol and availableFlagLXCol, with X being 0 or        1, are derived as follows:        -   If slice_temporal_mvp_enabled_flag is equal to 0, both            components of mvLXCol are set equal to 0 and            availableFlagLXCol is set equal to 0.        -   Otherwise (slice_temporal_mvp_enabled_flag is equal to 1),            the following applies:

xColBr=xCb+cbWidth  (8-601)

yColBr=yCb+cbHeight  (8-602)

-   -   -   -   

            -   

            -   

            -   

        -   If yCb>>CtbLog 2SizeY is equal to yColBr>>CtbLog 2SizeY,            -   The variable colCb specifies the luma coding block                covering the modified location given by ((xColBr>>3)<<3,                (yColBr>>3)<<3) inside the collocated picture specified                by ColPic.            -   The luma location (xColCb, yColCb) is set equal to the                top-left sample of the collocated luma coding block                specified by colCb relative to the top-left luma sample                of the collocated picture specified by ColPic.            -   The derivation process for collocated motion vectors as                specified in clause 8.5.2.12 is invoked with currCb,                colCb, (xColCb, yColCb), refIdxLXCorner[3] and sbFlag                set equal to 0 as inputs, and the output is assigned to                mvLXCol and availableFlagLXCol.

    -   Otherwise, both components of mvLXCol are set equal to 0 and        availableFlagLXCol is set equal to 0.

. . .

5.2 Embodiment 2: Sub-Picture Constraint on Affine Constructed MergeCandidates 8.5.5.6 Derivation Process for Constructed Affine ControlPoint Motion Vector Merging Candidates

Inputs to this process are:

-   -   a luma location (xCb, yCb) specifying the top-left sample of the        current luma coding block relative to the top-left luma sample        of the current picture,    -   two variables cbWidth and cbHeight specifying the width and the        height of the current luma coding block,    -   the availability flags availableA₀, availableA₁, availableA₂,        availableB₀, availableB₁, availableB₂, availableB₃,    -   the sample locations (xNbA₀, yNbA₀), (xNbA₁, yNbA₁), (xNbA₂,        yNbA₂), (xNbB₀, yNbB₀), (xNbB₁, yNbB₁), (xNbB₂, yNbB₂) and        (xNbB₃, yNbB₃).

Output of this process are:

-   -   the availability flag of the constructed affine control point        motion vector merging candidates availableFlagConstK, with K=1 .        . . 6,    -   the reference indices refIdxLXConstK, with K=1 . . . 6, X being        0 or 1,    -   the prediction list utilization flags predFlagLXConstK, with K=1        . . . 6, X being 0 or 1,    -   the affine motion model indices motionModelIdcConstK, with K=1 .        . . 6,    -   the bi-prediction weight indices bcwIdxConstK, with K=1 . . . 6,    -   the constructed affine control point motion vectors        cpMvLXConstK[cpIdx] with cpIdx=0 . . . 2, K=1 . . . 6 and X        being 0 or 1.

. . .

The fourth (collocated bottom-right) control point motion vectorcpMvLXCorner[3], reference index refIdxLXCorner[3], prediction listutilization flag predFlagLXCorner[3] and the availability flagavailableFlagCorner[3] with X being 0 and 1 are derived as follows:

-   -   The reference indices for the temporal merging candidate,        refIdxLXCorner[3], with X being 0 or 1, are set equal to 0.    -   The variables mvLXCol and availableFlagLXCol, with X being 0 or        1, are derived as follows:        -   If slice_temporal_mvp_enabled_flag is equal to 0, both            components of mvLXCol are set equal to 0 and            availableFlagLXCol is set equal to 0.        -   Otherwise (slice_temporal_mvp_enabled_flag is equal to 1),            the following applies:

xColBr=xCb+cbWidth  (8-601)

yColBr=yCb+cbHeight  (8-602)

-   -   -   

        -   -   

            -   

            -   

            -   

            -   If yCb>>CtbLog 2SizeY is equal to yColBr>>CtbLog 2SizeY,                [[yColBr is less than pic_height_in_luma_samples and                xColBr is less than pic_width_in_luma_samples, the                following applies]]:                -   The variable colCb specifies the luma coding block                    covering the modified location given by                    ((xColBr>>3)<<3, (yColBr>>3)<3) inside the                    collocated picture specified by ColPic.                -   The luma location (xColCb, yColCb) is set equal to                    the top-left sample of the collocated luma coding                    block specified by colCb relative to the top-left                    luma sample of the collocated picture specified by                    ColPic.                -   The derivation process for collocated motion vectors                    as specified in clause 8.5.2.12 is invoked with                    currCb, colCb, (xColCb, yColCb), refIdxLXCorner[3]                    and sbFlag set equal to 0 as inputs, and the output                    is assigned to mvLXCol and availableFlagLXCol.

            -   Otherwise, both components of mvLXCol are set equal to 0                and availableFlagLXCol is set equal to 0.

5.3 Embodiment 3: Fetching Integer Samples Under the Sub-PictureConstraint 8.5.6.3.3 Luma Integer Sample Fetching Process

Inputs to this process are:

-   -   a luma location in full-sample units (xInt_(L), yInt_(L)),    -   the luma reference sample array refPicLX_(L),

Output of this process is a predicted luma sample value predSampleLX_(L)

The variable shift is set equal to Max(2, 14−BitDepth_(Y)).

The variable picW is set equal to pic_width_in_luma_samples and thevariable picH is set equal to pic_height_in_luma_samples.

The luma locations in full-sample units (xInt, yInt) are derived asfollows:

-   -   -   

        -   

    -   

xInt=Clip3(0,picW−1,sps_ref_wraparound_enabled_flag?ClipH((sps_ref_wraparound_offset_minus1+1)*MinCbSizeY,picW,xInt_(L)):xInt_(L))  (8-782)

yInt=Clip3(0,picH−1,yInt_(L))  (8-783)

The predicted luma sample value predSampleLX_(L) is derived as follows:

predSampleLX _(L)=refPicLX _(L)[xInt][yInt]<<shift3  (8-784)

5.4 Embodiment 4: Deriving the Variable invAvgLuma in Chroma ResidualScaling of LMCS

8.7.5.3 Picture Reconstruction with Luma Dependent Chroma ResidualScaling Process for Chroma Samples

Inputs to this process are:

-   -   a chroma location (xCurr, yCurr) of the top-left chroma sample        of the current chroma transform block relative to the top-left        chroma sample of the current picture,    -   a variable nCurrSw specifying the chroma transform block width,    -   a variable nCurrSh specifying the chroma transform block height,    -   a variable tuCbfChroma specifying the coded block flag of the        current chroma transform block,    -   an (nCurrSw)×(nCurrSh) array predSamples specifying the chroma        prediction samples of the current block,    -   an (nCurrSw)×(nCurrSh) array resSamples specifying the chroma        residual samples of the current block, Output of this process is        a reconstructed chroma picture sample array recSamples.

The variable sizeY is set equal to Min(CtbSizeY, 64).

The reconstructed chroma picture sample recSamples is derived as followsfor i=0 . . . nCurrSw−1, j=0 . . . nCurrSh−1:

-   -   . . .    -   Otherwise, the following applies:        -   . . .    -   The variable currPic specifies the array of reconstructed luma        samples in the current picture.    -   For the derivation of the variable varScale the following        ordered steps apply:    -   1. The variable invAvgLuma is derived as follows:        -   The array recLuma[i] with i=0 . . . (2*sizeY−1) and the            variable cnt are derived as follows:            -   The variable cnt is set equal to 0.

            -   

            -   

            -   

            -   -   

            -   When availL is equal to TRUE, the array recLuma[i] with                i=0 . . . sizeY−1 is a set equal to                currPic[xCuCb−1][Min(yCuCb+i,                [[pic_height_in_luma_samples−1]]                )] with i=0 . . . sizeY−1, and cnt is set equal to sizeY

            -   When availT is equal to TRUE, the array recLuma[cnt+i]                with i=0 . . . sizeY−1 is set equal to

            -   currPic[Min(xCuCb+i, [[pic_width_in_luma_samples−1]]                )][yCuCb−1] with i=0 . . . sizeY−1, and cnt is set equal                to (cnt+sizeY)        -   The variable invAvgLuma is derived as follows:            -   If cnt is greater than 0, the following applies:

invAvgLuma=Clip1_(Y)((Σ_(k=0) ^(cnt-1) recLuma[k]+(cnt>>1))>>Log2(cnt))  (8-1013)

-   -   -   -   Otherwise (cnt is equal to 0), the following applies:

invAvgLuma=1<<(BitDepth_(Y)−1)  (8-1014)

5.5 Embodiment 5: An Example of Defining the Subpicture Element in Unitof N (Such as N=8 or 32) Other than 4 Samples 7.4.3.3 Sequence ParameterSet RBSP Semantics

subpic_grid_col_width_minus1 plus 1 specifies the width of each elementof the subpicture identifier grid in units of

samples. The length of the syntax element is Ceil(Log2(pic_width_max_in_luma_samples/

) bits.

The variable NumSubPicGridCols is derived as follows:

NumSubPicGridCols=(pic_width_max_in_luma_samples+subpic_grid_col_width_minus1*[[4+3]]

)/(subpic_grid_col_width_minus1*[[4+3]]

)  (7-5)

subpic_grid_row_height_minus1 plus 1 specifies the height of eachelement of the subpicture identifier grid in units of 4 samples. Thelength of the syntax element is Ceil(Log2(pic_height_max_in_luma_samples/

) bits.

The variable NumSubPicGridRows is derived as follows:

NumSubPicGridRows=(pic_height_max_in_luma_samples+subpic_grid_row_height_minus1*

)/(subpic_grid_row_height_minus1*[[4+3]

)

7.4.7.1 General Slice Header Semantics

The variables SubPicIdx, SubPicLeftBoundaryPos, SubPicTopBoundaryPos,SubPicRightBoundaryPos, and SubPicBotBoundaryPos are derived as follows:

  SubPicIdx    =    CtbToSubPicIdx[ CtbAddrBsToRs[ FirstCtbAddrBs[SliceBrickIdx[ 0 ] ] ] ] if(       subpic_treated_as_pic_flag[ SubPicIdx]         )           {  SubPicLeftBoundaryPos  =  SubPicLeft[ SubPicIdx] * ( subpic_grid_col_width_minus1 + 1 ) * 

 SubPicRightBoundaryPos    =    ( SubPicLeft[ SubPicIdx ] + SubPicWidth[SubPicIdx ] ) *        ( subpic_grid_col_width_minus1 + 1 ) * 

 SubPicTopBoundaryPos = SubPicTop[ SubPicIdx ] * (subpic_grid_row_height_minus1 + 1 )* 

 SubPicBotBoundaryPos     =     ( SubPicTop[ SubPicIdx ] + SubPicHeight[SubPicIdx ] ) *        ( subpic_grid_row_height_minus1 + 1) * 

}

5.6 Embodiment 6: Restrict the Picture Width and the Picture Height tobe Equal or Larger than 8 7.4.3.3 Sequence Parameter Set RBSP Semantics

pic_width_max_in_luma_samples specifies the maximum width, in units ofluma samples, of each decoded picture referring to the SPS.pic_width_max_in_luma_samples shall not be equal to 0 and shall be aninteger multiple of [[MinCbSizeY]]

pic_height_max_in_luma_samples specifies the maximum height, in units ofluma samples, of each decoded picture referring to the SPS.pic_height_max_in_luma_samples shall not be equal to 0 and shall be aninteger multiple of [[MinCbSizeY]]

5.7 Embodiment 7: Subpicture Boundary Check for BT/TT/QT Splitting,BT/TT/QT Depth Derivation, and/or the Signaling of CU Split Flag 6.4.2Allowed Binary Split Process

The variable allowBtSplit is derived as follows:

-   -   . . .    -   Otherwise, if all of the following conditions are true,        allowBtSplit is set equal to FALSE        -   btSplit is equal to SPLIT_BT_VER        -   y0+cbHeight is greater than [[pic_height_in_luma_samples]]    -   Otherwise, if all of the following conditions are true,        allowBtSplit is set equal to FALSE        -   btSplit is equal to SPLIT_BT_VER        -   cbHeight is greater than MaxTbSizeY        -   x0+cbWidth is greater than [[pic_width_in_luma_samples]]    -   Otherwise, if all of the following conditions are true,        allowBtSplit is set equal to FALSE        -   btSplit is equal to SPLIT_BT_HOR        -   cbWidth is greater than MaxTbSizeY        -   y0+cbHeight is greater than [[pic_height_in_luma_samples]]    -   Otherwise, if all of the following conditions are true,        allowBtSplit is equal to FALSE        -   x0+cbWidth is greater than [[pic_width_in_luma_samples]]        -   y+cbHeight is greater than [[pic_height_in_luma_samples]]        -   cbWidth is greater than minQtSize    -   Otherwise, if all of the following conditions are true,        allowBtSplit is set equal to FALSE        -   btSplit is equal to SPLIT_BT_HOR        -   x0+cbWidth is greater than [[pic_width_in_luma_samples]]        -   y0+cbHeight is less than or equal to            [[pic_height_in_luma_samples]]

6.4.2 Allowed Ternary Split Process

The variable allowTtSplit is derived as follows:

-   -   If one or more of the following conditions are true,        allowTtSplit is set equal to FALSE:        -   cbSize is less than or equal to 2*MinTtSizeY        -   cbWidth is greater than Min(MaxTbSizeY, maxTtSize)        -   cbHeight is greater than Min(MaxThSizeY, maxTtSize)        -   mttDepth is greater than or equal to maxMttDepth        -   x0+cbWidth is greater than [[pic_width_in_luma_samples]]        -   y0+cbHeight is greater than [[pic_height_in_luma_samples]]        -   treeType is equal to DUAL_TREE_CHROMA and            (cbWidth/SubWidthC)*(cbHeight/SubHeightC) is less than or            equal to 32        -   treeType is equal to DUAL_TREE_CHROMA and modeType is equal            to MODE_TYPE_INTRA        -   Otherwise, allowTtSplit is set equal to TRUE.

7.3.8.2 Coding Tree Unit Syntax

De- scriptor dual_tree_implicit_qt_split( x0, y0, cbSize, cqtDepth ) {...  if( x1 < [[pic_width_in_luma_samples]]  

    

  

  

   

  

  

  

   

 )  dual_tree_implicit_qt_split( x1, y0, cbSize / 2, cqtDepth + 1 )  if(y1 < [[pic_height_in_luma_samples]]  

    

  

  

   

  

  

  

   

 ) )  dual_tree_implicit_qt_split( x0, y1, cbSize / 2, cqtDepth + 1 ) if( x1 < [[pic_width_in_luma_samples]]  

  

    

  

   

  

  

  

  

  && y1 < [[pic_height_in_luma_samples]]  

  

   

  

   

  

  

  

   

 ) )  dual_tree_implicit_qt_split( x1, y1, cbSize / 2, cqtDepth + 1 )  }else { ...  } }

7.3.8.4 Coding Tree Syntax

Descriptor coding_tree( x0, y0, cbWidth, cbHeight, qgOnY, qgOnC,cbSubdiv, cqtDepth, mttDepth, depthOffset,      partIdx, treeTypeCurr,modeTypeCurr ) {  if( ( allowSplitBtVer ∥ allowSplitBtHor ∥allowSplitTtVer ∥ allowSplitTtHor ∥ allowSplitQT )   &&( x0 + cbWidth <=[[pic_width_in_luma_samples]]  

  

  

  

  

  

   

  

  )  && (y0 + cbHeight <= [[pic_height_in_luma_samples]]  

  

  

  

  

  

   

  

  

 ) ) )   split_cu_flag ae(v)  if( cu_qp_delta_enabled_flag && qgOnY &&cbSubdiv <= cu_qp_delta_subdiv ) { ...     depthOffset += (y0 +cbHeight > [[pic_height_in_luma_samples]] ( 

  

  

  

  

   

  

 )) ? 1: 0     y1 = y0 + ( cbHeight / 2 )     coding_tree( x0, y0 ,cbWidth, cbHeight / 2, qgOnY, qgOnC, cbSubdiv + 1,        cqtDepth,mttDepth + 1, depthOffset, 0, treeType, modeType )     if( y1 <[[pic_height_in_luma_samples]] ( 

  

  

   

  

  

  

  

 ))      coding_tree( x0, y1, cbWidth, cbHeight / 2, qgOnY, qgOnC,cbSubdiv + 1,         cqtDepth, mttDepth + 1, depthOffset, 1, treeType,modeType ) ...    if( x1 < [[pic_width_in_luma_samples]]  

  

  

   

  

  

  

 ) )     coding_tree( x1, y0, cbWidth / 2, cbHeight / 2, qgOnY, qgOnC,cbSubdiv + 2,       cqtDepth + 1, 0, 0, 1, treeType, modeType )    if(y1 < [[pic_height_in_luma_samples]] ( 

  

  

   

  

  

  

 ))     coding_tree( x0, y1, cbWidth / 2, cbHeight / 2, qgOnY, qgOnC,cbSubdiv + 2,       cqtDepth + 1, 0, 0, 2, treeType, modeType )    if(y1 < [[pic_height_in_luma_samples]] ( 

  

  

    

  

  

  

 ) && x1 < [[pic_width_in_luma_samples]]  

  

  

   

  

  

  

 )     coding_tree( x1, y1, cbWidth / 2, cbHeight / 2, qgOnY, qgOnC,cbSubdiv + 2,       cqtDepth + 1, 0, 0, 3, treeType, modeType )

FIG. 3 is a block diagram of a video processing apparatus 300. Theapparatus 300 may be used to implement one or more of the methodsdescribed herein. The apparatus 300 may be embodied in a smartphone,tablet, computer, Internet of Things (IoT) receiver, and so on. Theapparatus 300 may include one or more processors 302, one or morememories 304 and video processing hardware 306. The processor(s) 302 maybe configured to implement one or more methods described in the presentdocument. The memory (memories) 304 may be used for storing data andcode used for implementing the methods and techniques described herein.The video processing hardware 306 may be used to implement, in hardwarecircuitry, some techniques described in the present document.

FIG. 4 is a flowchart for a method 400 of processing a video. The method1800 includes determining (402), for a video block in a first videoregion of a video, whether a position at which a temporal motion vectorpredictor is determined for a conversion between the video block and abitstream representation of the current video block using an affine modeis within a second video region, and performing (404) the conversionbased on the determining.

The following solutions may be implemented as preferred solutions insome embodiments.

The following solutions may be implemented together with additionaltechniques described in items listed in the previous section (e.g., item1).

1. A method of video processing, comprising: determining, for a videoblock in a first video region of a video, whether a position at which atemporal motion vector predictor is determined for a conversion betweenthe video block and a bitstream representation of the current videoblock using an affine mode is within a second video region; andperforming the conversion based on the determining.

2. The method of solution 1, wherein the video block is covered by thefirst region and the second region.

3. The method of any of solutions 1-2, wherein, in case that theposition of the temporal motion vector predictor is outside of thesecond video region, then the temporal motion vector predictor is markedas unavailable and is unused in the conversion.

The following solutions may be implemented together with additionaltechniques described in items listed in the previous section (e.g., item2).

4. A method of video processing, comprising: determining, for a videoblock in a first video region of a video, whether a position at which aninteger sample in a reference picture is fetched for a conversionbetween the video block and a bitstream representation of the currentvideo block is within a second video region, wherein the referencepicture is not used in an interpolation process during the conversion;and performing the conversion based on the determining.

5. The method of solution 4, wherein the video block is covered by thefirst region and the second region.

6. The method of any of solutions 4-5, wherein, in case that theposition of the sample is outside of the second video region, then thesample is marked as unavailable and is unused in the conversion.

The following solutions may be implemented together with additionaltechniques described in items listed in the previous section (e.g., item3).

7. A method of video processing, comprising: determining, for a videoblock in a first video region of a video, whether a position at which areconstructed luma sample value is fetched for a conversion between thevideo block and a bitstream representation of the current video block iswithin a second video region; and performing the conversion based on thedetermining.

8. The method of solution 7, wherein the luma sample is covered by thefirst region and the second region.

9. The method of any of solutions 7-8, wherein, in case that theposition of the luma sample is outside of the second video region, thenthe luma sample is marked as unavailable and is unused in theconversion.

The following solutions may be implemented together with additionaltechniques described in items listed in the previous section (e.g., item4).

10. A method of video processing, comprising: determining, for a videoblock in a first video region of a video, whether a position at which acheck regarding splitting, depth derivation or split flag signaling forthe video block is performed during a conversion between the video blockand a bitstream representation of the current video block is within asecond video region; and performing the conversion based on thedetermining.

11. The method of solution 10, wherein the position is covered by thefirst region and the second region.

12. The method of any of solutions 10-11, wherein, in case that theposition is outside of the second video region, then the luma sample ismarked as unavailable and is unused in the conversion.

The following solutions may be implemented together with additionaltechniques described in items listed in the previous section (e.g., item8).

13. A method of video processing, comprising: performing a conversionbetween a video comprising one or more video pictures comprising one ormore video blocks, and a coded representation of the video, wherein thecoded representation complies with a coding syntax requirement that theconversion is not to use sub-picture coding/decoding and a dynamicresolution conversion coding/decoding tool or a reference pictureresampling tool within a video unit.

14. The method of solution 13, wherein the video unit corresponds to asequence of the one or more video pictures.

15. The method of any of solutions 13-14, wherein the dynamic resolutionconversion coding/decoding tool comprises an adaptive resolutionconversion coding/decoding tool.

16. The method of any of solutions 13-14, wherein the dynamic resolutionconversion coding/decoding tool comprises a dynamic resolutionconversion coding/decoding tool.

17. The method of any of solutions 13-16, wherein the codedrepresentation indicates that the video unit complies with the codingsyntax requirement.

18. The method of solution 17, wherein the coded representationindicates that the video unit uses sub-picture coding.

19. The method of solution 17, wherein the coded representationindicates that the video unit uses the dynamic resolution conversioncoding/decoding tool or the reference picture resampling tool.

The following solutions may be implemented together with additionaltechniques described in items listed in the previous section (e.g., item10).

20. The method of any of solutions 1-19, wherein the second video regioncomprises a video sub-picture and wherein boundaries of the second videoregion and another video region is also a boundary between two codingtree units.

21. The method of any of solutions 1-19, wherein the second video regioncomprises a video sub-picture and wherein boundaries of the second videoregion and another video region is also a boundary between two codingtree units.

The following solutions may be implemented together with additionaltechniques described in items listed in the previous section (e.g., item11).

22. The method of any of solutions 1-21, wherein the first video regionand the second video region have rectangular shapes.

The following solutions may be implemented together with additionaltechniques described in items listed in the previous section (e.g., item12).

23. The method of any of solutions 1-22, wherein the first video regionand the second video region are non-overlapping.

The following solutions may be implemented together with additionaltechniques described in items listed in the previous section (e.g., item13).

24. The method of any of solutions 1-23, wherein the video picture isdivided into video regions such that a pixel in the video picture iscovered by one and only one video region.

The following solutions may be implemented together with additionaltechniques described in items listed in the previous section (e.g., item15).

25. The method of any of solutions 1-24, wherein the video picture issplit into the first video region and the second video region due to thevideo picture being in a specific layer of the video sequence.

The following solutions may be implemented together with additionaltechniques described in items listed in the previous section (e.g., item10).

26. A method of video processing, comprising: performing a conversionbetween a video comprising one or more video pictures comprising one ormore video blocks, and a coded representation of the video, wherein thecoded representation complies with a coding syntax requirement that afirst syntax element subpic_grid_idx[i][j] is not larger than a secondsyntax element max_subpics_minus1.

27. The method of solution 26, wherein a codeword representing the firstsyntax element is not larger than a codeword representing the secondsyntax element.

28. The method of any of solutions 1-27, wherein the first video regioncomprises a video sub-picture.

29. The method of any of solutions 1-28, wherein the second video regioncomprises a video sub-picture.

30. The method of any of solutions 1 to 29, wherein the conversioncomprises encoding the video into the coded representation.

31. The method of any of solutions 1 to 29, wherein the conversioncomprises decoding the coded representation to generate pixel values ofthe video.

32. A video decoding apparatus comprising a processor configured toimplement a method recited in one or more of solutions 1 to 31.

33. A video encoding apparatus comprising a processor configured toimplement a method recited in one or more of solutions 1 to 31.

34. A computer program product having computer code stored thereon, thecode, when executed by a processor, causes the processor to implement amethod recited in any of solutions 1 to 31.

35. A method, apparatus or system described in the present document.

FIG. 5 is a block diagram showing an example video processing system 500in which various techniques disclosed herein may be implemented. Variousimplementations may include some or all of the components of the system500. The system 500 may include input 502 for receiving video content.The video content may be received in a raw or uncompressed format, e.g.,8 or 10 bit multi-component pixel values, or may be in a compressed orencoded format. The input 502 may represent a network interface, aperipheral bus interface, or a storage interface. Examples of networkinterface include wired interfaces such as Ethernet, passive opticalnetwork (PON), etc. and wireless interfaces such as Wi-Fi or cellularinterfaces.

The system 500 may include a coding component 504 that may implement thevarious coding or encoding methods described in the present document.The coding component 504 may reduce the average bitrate of video fromthe input 502 to the output of the coding component 504 to produce acoded representation of the video. The coding techniques are thereforesometimes called video compression or video transcoding techniques. Theoutput of the coding component 504 may be either stored, or transmittedvia a communication connected, as represented by the component 506. Thestored or communicated bitstream (or coded) representation of the videoreceived at the input 502 may be used by the component 508 forgenerating pixel values or displayable video that is sent to a displayinterface 510. The process of generating user-viewable video from thebitstream representation is sometimes called video decompression.Furthermore, while certain video processing operations are referred toas “coding” operations or tools, it will be appreciated that the codingtools or operations are used at an encoder and corresponding decodingtools or operations that reverse the results of the coding will beperformed by a decoder.

Examples of a peripheral bus interface or a display interface mayinclude universal serial bus (USB) or high definition multimediainterface (HDMI) or Displayport, and so on. Examples of storageinterfaces include SATA (serial advanced technology attachment), PCI,IDE interface, and the like. The techniques described in the presentdocument may be embodied in various electronic devices such as mobilephones, laptops, smartphones or other devices that are capable ofperforming digital data processing and/or video display.

FIG. 6 is a flowchart representation of a method 600 for videoprocessing in accordance with the present technology. The method 600includes, at operation 610, determining, for a conversion between acurrent block of a first picture of a video and a bitstreamrepresentation of the video, a motion candidate based on motioninformation from a second picture according to a rule. The rulespecifies that a position from which the motion information is accessedis constrained to be within a specific subpicture of the second picture.The method 600 also includes at operation 620, performing the conversionbased on the determining.

In some embodiments, the motion information comprises a motion vectorand the motion candidate comprises an affine motion candidate. In someembodiments, the rule specifies that the position is used as areplacement for a first position in case the first position is outsideof the specific subpicture. In some embodiments, the position is at abottom-right corner of a block in the video picture that corresponds tothe current block.

FIG. 7 is a flowchart representation of a method 700 for videoprocessing in accordance with the present technology. The method 700includes, at operation 710, determining, for a conversion of a currentblock of a first picture of a video and a bitstream representation ofthe video, an integer sample from a second picture according to a rule.The second picture comprises a reference picture that is not used in aninterpolation process. The rule specifies that a position from which theinteger sample is accessed is constrained to be within a specificsubpicture of the second picture. The method 700 also includes, atoperation 720, performing the conversion based on the determining. Insome embodiments, the integer sample is used to generate one or moregradients in a Bi-Directional Optical Flow or a Prediction RefinementOptical Flow process.

FIG. 8 is a flowchart representation of a method 800 for videoprocessing in accordance with the present technology. The method 800includes, at operation 810, determining, for a conversion of a currentblock of a video and a bitstream representation of the video, a positionat which a reconstructed luma sample is accessed according to a rule.The rule specifies that the position is constrained to be within aspecific subpicture of a video picture. The method 800 also includes, atoperation 820, performing the conversion based on the determining. Insome embodiments, the reconstructed luma sample is accessed to derive ascaling factor for a chroma component in a luma mapping chroma scalingprocess.

FIG. 9 is a flowchart representation of a method 900 for videoprocessing in accordance with the present technology. The method 900includes, at operation 910, determining, for a conversion of a currentblock of a video and a bitstream representation of the video, a positionat which a picture boundary check is performed according to a rule. Therule specifies that the position is constrained to be within a specificsubpicture of a video picture. The method 900 also includes, atoperation 920, performing the conversion based on the determining.

In some embodiments, the picture boundary check is performed for atleast one of: (1) a splitting of a binary tree, a tertiary tree, or aquad tree, (2) a depth derivation for a binary tree, a tertiary tree, ora quad tree, (3) or a signaling of a split flag for the current block.In some embodiments, the specific subpicture is a collocated subpicturethat covers the current block.

In some embodiments, the rule specifies that information at the positiontreated as unavailable in case the position is outside of a specificsubpicture. The position is represented as (x, y), a top-left corner ofthe specific subpicture is represented as (xTL, yTL), and a bottom-rightcorner of the specific subpicture is represented as (xBR, yBR). In someembodiments, the position is outside of the specific subpicture in casex>xBR, y>yBR, x<xTL, or y<yTL. In some embodiments, the rule specifiesthat the position is clipped to be within a specific subpicture of thevideo picture. The position is represented as (x, y), a top-left cornerof the specific subpicture is represented as (xTL, yTL), and abottom-right corner of the specific subpicture is represented as (xBR,yBR). In some embodiments, x is clipped to be a smaller value of x andxBR. In some embodiments, y is clipped to be a smaller value of y andyBR. In some embodiments, x is clipped to be a larger value of x andxTL. In some embodiments, y is clipped to be a larger value of y andyTL.

In some embodiments, whether the rule is applicable is based on a syntaxelement in the bitstream representation. In some embodiments, the syntaxelement is signaled in a video parameter set, a dependency parameterset, a slice parameter set, a picture parameter set, an active parameterset, a slice header, or a tile group header. In some embodiments, thesyntax element comprises subpic_treated_as_pic_flag[SubPicIdx], whereSubPicIdx is a subpicture index of the specific subpicture that coversthe current block.

In some embodiments, the conversion generates the current block from thebitstream representation. In some embodiments, the conversion generatesthe bitstream representation from the current block.

FIG. 10 is a flowchart representation of a method 1000 for videoprocessing in accordance with the present technology. The method 1000includes, at operation 1010, resetting, after a conversion of asub-picture of a video picture of a video and a bitstream representationof the video, a table of motion candidates derived based on pastconversions. The method 1000 also includes, at operation 1020,performing a conversion of a subsequent sub-picture of the video pictureand the bitstream representation using the table after the resetting.

In some embodiments, the table of motion candidates comprises motioncandidates for an intra-block coding mode. In some embodiments, thetable of motion candidates comprises motion candidates for an intercoding mode. In some embodiments, the table of motion candidatescomprises motion candidates for an intra coding mode.

In some embodiments, the conversion generates the sub-picture or thesubsequent sub-picture from the bitstream representation. In someembodiments, the conversion generates the bitstream representation fromthe sub-picture or the subsequent sub-picture.

FIG. 11 is a flowchart representation of a method 1100 for videoprocessing in accordance with the present technology. The method 1100includes, at operation 1110, performing a conversion between a videocomprising a video picture that includes multiple sub-pictures andmultiple video blocks and a coded representation of the video accordingto a rule. The rule specifies that a boundary between any twosub-pictures is also a boundary between two video blocks. A video blockin the video picture is covered by a single subpicture of the videopicture.

In some embodiments, any position in the video picture is covered by atmost one subpicture of the video picture. In some embodiments, aposition in the video picture is not covered by any subpicture of thevideo picture. In some embodiments, the two sub-pictures of the videopicture have no overlapping area.

In some embodiments, a dimension of a subpicture of the video picture isdetermined based on a dimension of a video block. In some embodiments, asub-picture comprises multiple elements. A syntax element indicating awidth of an element in the sub-picture is represented as N samples, anda width of the sub-picture is determined based on the N samples. In someembodiments, a width of the video block comprises N samples.

In some embodiments, a sub-picture comprises multiple elements. A syntaxelement indicating a height of an element in the sub-picture isrepresented as N samples, and a height of the sub-picture is determinedbased on the N samples. In some embodiments, a height of the video blockcomprises N samples.

In some embodiments, the video block is a coding tree block (CTB) or acoding tree unit (CTU). In some embodiments, a sub-picture has arectangular shape. In some embodiments, the sub-picture comprisesrectangular slices. In some embodiments, a sub-picture is applicable toonly selected one or more layers of the video. In some embodiments, thesub-picture is defined in a sequence parameter set in the bitstreamrepresentation, and the sub-picture is applicable to a layer with ahighest resolution in a corresponding sequence. In some embodiments, thesub-picture is defined in a sequence parameter set in the bitstreamrepresentation, and the sub-picture is applicable to a layer with alowest resolution in a corresponding sequence. In some embodiments, theselected one or more layers to which the sub-picture is applicable aresignaled in one or more syntax elements in the bitstream representation.In some embodiments, one or more layers to which the sub-picture isinapplicable are signaled in one or more syntax elements in thebitstream representation. In some embodiments, the one or more syntaxelements are signaled in a sequence parameter set, a video parameterset, or a picture parameter set in the bitstream representation.

FIG. 12 is a flowchart representation of a method 1200 for videoprocessing in accordance with the present technology. The method 1200includes, at operation 1210, performing a conversion between a videounit of a video and a coded representation of the video using at least avideo picture, where only one of a sub-picture coding mode or aresolution-changing coding mode is enabled for the video unit. Thesub-picture coding mode is a mode in which the video picture is dividedinto multiple sub-pictures, and the resolution-changing coding mode is amode in which a resolution of the video picture is adjusted during theconversion.

In some embodiments, the video picture comprises a current picture or areference picture. In some embodiments, the resolution-changing codingmode comprises a Reference Picture Resampling (PRP) mode. In someembodiments, the resolution-changing coding mode comprises a DynamicResolution Conversion (DRC) mode. In some embodiments, theresolution-changing coding mode comprises an Adaptive ResolutionConversion (ARC) mode.

In some embodiments, the video unit comprises a video sequence. In someembodiments, a syntax element is included in the coded representation toindicate that the sub-picture coding mode is enabled for the coding unitin case the resolution-changing coding mode is disallowed. In someembodiments, the resolution-changing coding mode is disallowed in case asyntax element is included in the coded representation to indicate thatthe sub-picture coding mode is enabled. In some embodiments, the syntaxelement comprises subpics_present_flag. In some embodiments, a width ofthe video picture is set to be equal to a maximum width allowed forvideo pictures in the video unit in case the syntax element indicatesthat the sub-picture coding mode is enabled.

FIG. 13 is a flowchart representation of a method 1300 for videoprocessing in accordance with the present technology. The method 1300includes, at operation 1310, performing a conversion between a videounit of a video and a coded representation of the video using at least avideo picture, where both a sub-picture coding mode and aresolution-changing coding mode are enabled for the video unit. Thesub-picture coding mode is a mode in which the video picture is dividedinto multiple sub-pictures, and the resolution-changing coding mode is amode in which a resolution of the video picture is adjusted during theconversion.

In some embodiments, the video unit comprises a video sequence. In someembodiments, the resolution-changing coding mode comprises an AdaptiveResolution Conversion (ARC) mode, a Dynamic Resolution Conversion (DRC)mode, a Reference Picture Resampling (PRP) mode.

In some embodiments, the video picture includes multiple video blocks,each having a dimension of W×H. A sub-picture adjusted according to theresolution-changing coding mode has a width of K×W and a height of M×H,K and M being integers. In some embodiments, the sub-picture is notlocated at a boundary of the video picture. In some embodiments, theboundary comprises a right boundary or a bottom boundary.

In some embodiments, the video picture includes multiple video blocks,and a dimension of individual video blocks is adjusted based on aresolution of the video picture. In some embodiments, the codedrepresentation comprises a syntax element indicating a maximum dimensionfor a video block, and the dimension of an individual video block isadjusted based on the maximum dimension and the resolution of the videopicture. In some embodiments, the dimension of the individual videoblocks is signaled in a sequence parameter set, a picture parameter set,or at a sub-picture level in the coded representation.

FIG. 14 is a flowchart representation of a method 1400 for videoprocessing in accordance with the present technology. The method 1400includes, at operation 1410, performing a conversion between a videocomprising one or more video pictures and a coded representation of thevideo, where a dimension of an individual video picture is constrainedto be greater than or equal to 8. In some embodiments, the dimension isa width of the individual video picture. In some embodiments, thedimension is a height of the individual video picture.

FIG. 15 is a flowchart representation of a method 1500 for videoprocessing in accordance with the present technology. The method 1500includes, at operation 1510, performing a conversion between a videopicture of a video and a coded representation of the video according toa rule. The video picture comprises at least one sub-picture, and therule specifies that a characteristic of a sub-picture is represented asat lease one syntax element in the coded representation, the at leastone syntax element being different than an index value of thesub-picture grid in the video picture.

In some embodiments, the characteristic comprises a top-left position ofthe sub-picture. In some embodiments, the characteristic comprises abottom-right position of the sub-picture. In some embodiments, thecharacteristic comprises a width of the sub-picture. In someembodiments, the characteristic comprises a height of the sub-picture.In some embodiments, the index value of the sub-picture in the videopicture is smaller than a maximum number of subpictures in the videopicture. In some embodiments, an integer value in a range of [0, themaximum number of subpictures-1] has a one-to-one correspondence withindices values of subpictures in the video picture.

FIG. 16 is a flowchart representation of a method 1600 for videoprocessing in accordance with the present technology. The method 1600includes, at operation 1610, performing a conversion between a videopicture of a video and a coded representation of the video according toa rule. The video picture comprises multiple sub-pictures, eachsub-picture comprising multiple elements. The rule specifies that adimension of individual elements in a sub-picture satisfies aconstraint.

In some embodiments, the constraint specifies that a width of anindividual element is smaller than T1. In some embodiments, theconstraint specifies that a height of an individual element is smallerthan T2. In some embodiments, the video picture comprises multiple videoblocks, and the constraint specifies that the sub-picture determinedbased on the dimension of the individual elements is covered by acurrent video block being processed during the conversion. In someembodiments, a sample outside of the sub-picture covered by the currentvideo block is considered as unavailable for the conversion. In someembodiments, the constraint specifies that the dimension of theindividual elements is determined based on a profile, a level, or a tierof a video coding standard. In some embodiments, the constraintspecifies that the dimension of the individual elements is determinedbased on a width of the video picture. In some embodiments, a width ofthe individual elements is equal topic_width_max_in_luma_samples/4+offset, wherepic_width_max_in_luma_samples represents a maximum picture width in lumasamples and offset is zero or a non-zero integer. In some embodiments,the constraint specifies that the dimension of the individual elementsis determined based on a height of the video picture. In someembodiments, a height of the individual elements is equal topic_height_max_in_luma_samples/4+offset, wherepic_height_max_in_luma_samples represents a maximum picture height inluma samples and offset is zero or a non-zero integer.

In some embodiments, the conversion generates video picture from thebitstream representation. In some embodiments, the conversion generatesthe bitstream representation from the video picture.

FIG. 17 is a flowchart representation of a method 1700 for videoprocessing in accordance with the present technology. The method 1700includes, at operation 1710, performing a conversion between a videocomprising a picture that includes multiple sub-pictures and a codedrepresentation of the video using a coding mode according to a rule. Therule specifies that certain stored information about a previoussub-picture is reset prior to processing each next sub-picture of themultiple sub-pictures.

In some embodiments, the certain stored information comprises a virtualbuffer used for an intra-block copy coding mode in which a current blockin the video picture is coded with samples from the video picture. Insome embodiments, the certain stored information comprises a list ofentries used for a palette coding mode in which a current block in thevideo picture is coded using a palette of representative sample values.

FIG. 18 is a flowchart representation of a method 1800 for videoprocessing in accordance with the present technology. The method 1800includes, at operation 1810, performing a temporal filtering operationin a conversion between a video and a coded representation of the videoaccording to a rule. The video comprises multiple video pictures, eachcomprising multiple sub-pictures. The rule specifies that, for atemporal filtering a current sample in a current sub-picture of a videopicture, only samples within the same current sub-picture or asub-picture in a different video picture corresponding to the currentsub-picture are available.

FIG. 19 is a flowchart representation of a method 1900 for videoprocessing in accordance with the present technology. The method 1900includes, at operation 1910, determining, for a conversion between ablock in a video picture of a video and a coded representation of thevideo, a manner of applying a partitioning method to the block based onwhether the block crosses one or more sub-picture boundaries of thevideo picture. The method 1900 also includes, at operation 1920,performing the conversion based on the determining.

In some embodiments, the partitioning method comprising at least one of:a quad-tree partitioning method, a horizontal binary tree partitioningmethod, a vertical binary tree partitioning method, a horizontaltertiary tree partitioning method, a vertical tertiary tree partitioningmethod, or a no-splitting method. In some embodiments, the mannerfurther specifies whether a boundary handling method is applicable tothe block. In some embodiments, the method includes determining a mannerof processing a syntax element in the coded representation indicatingthe partitioning method based on whether the block is located across theone or more boundaries of the sub-picture of the video picture.

FIG. 20 is a flowchart representation of a method 2000 for videoprocessing in accordance with the present technology. The method 2000includes, at operation 2010, determining, for a conversion between avideo picture of a video and a coded representation of the video, twosub-regions of the video picture. A first sub-region comprises multiplesub-pictures of the video picture and a second sub-region comprisesremaining samples in the video picture. The method 2000 also includes,at operation 2020, performing the conversion based on the determining.

In some embodiments, a sample in the second sub-region is not located inany sub-picture of the video picture. In some embodiments, the secondsub-region is processed for the conversion based on information aboutthe first sub-region. In some embodiments, a default value is used inthe conversion to indicate whether a sample or an area of the videopicture is located within the second sub-region. In some embodiments,the default value is set to (max_subpics_minus1+K), whereinmax_subpics_minus1 indicates a maximum number of sub-pictures in thevideo picture, and K is an integer greater than 1. In some embodiments,the default value is assigned to each element in an array of indexvalues representing the sub-pictures in the video picture.

In some embodiments, the conversion generates the video from the codedrepresentation. In some embodiments, the conversion generates the codedrepresentation from the video.

Some embodiments of the disclosed technology include making a decisionor determination to enable a video processing tool or mode. In anexample, when the video processing tool or mode is enabled, the encoderwill use or implement the tool or mode in the processing of a block ofvideo, but may not necessarily modify the resulting bitstream based onthe usage of the tool or mode. That is, a conversion from the block ofvideo to the bitstream representation of the video will use the videoprocessing tool or mode when it is enabled based on the decision ordetermination. In another example, when the video processing tool ormode is enabled, the decoder will process the bitstream with theknowledge that the bitstream has been modified based on the videoprocessing tool or mode. That is, a conversion from the bitstreamrepresentation of the video to the block of video will be performedusing the video processing tool or mode that was enabled based on thedecision or determination.

Some embodiments of the disclosed technology include making a decisionor determination to disable a video processing tool or mode. In anexample, when the video processing tool or mode is disabled, the encoderwill not use the tool or mode in the conversion of the block of video tothe bitstream representation of the video. In another example, when thevideo processing tool or mode is disabled, the decoder will process thebitstream with the knowledge that the bitstream has not been modifiedusing the video processing tool or mode that was enabled based on thedecision or determination.

The disclosed and other solutions, examples, embodiments, modules andthe functional operations described in this document can be implementedin digital electronic circuitry, or in computer software, firmware, orhardware, including the structures disclosed in this document and theirstructural equivalents, or in combinations of one or more of them. Thedisclosed and other embodiments can be implemented as one or morecomputer program products, e.g., one or more modules of computer programinstructions encoded on a computer readable medium for execution by, orto control the operation of, data processing apparatus. The computerreadable medium can be a machine-readable storage device, amachine-readable storage substrate, a memory device, a composition ofmatter effecting a machine-readable propagated signal, or a combinationof one or more them. The term “data processing apparatus” encompassesall apparatus, devices, and machines for processing data, including byway of example a programmable processor, a computer, or multipleprocessors or computers. The apparatus can include, in addition tohardware, code that creates an execution environment for the computerprogram in question, e.g., code that constitutes processor firmware, aprotocol stack, a database management system, an operating system, or acombination of one or more of them. A propagated signal is anartificially generated signal, e.g., a machine-generated electrical,optical, or electromagnetic signal, that is generated to encodeinformation for transmission to suitable receiver apparatus.

A computer program (also known as a program, software, softwareapplication, script, or code) can be written in any form of programminglanguage, including compiled or interpreted languages, and it can bedeployed in any form, including as a stand-alone program or as a module,component, subroutine, or other unit suitable for use in a computingenvironment. A computer program does not necessarily correspond to afile in a file system. A program can be stored in a portion of a filethat holds other programs or data (e.g., one or more scripts stored in amarkup language document), in a single file dedicated to the program inquestion, or in multiple coordinated files (e.g., files that store oneor more modules, sub programs, or portions of code). A computer programcan be deployed to be executed on one computer or on multiple computersthat are located at one site or distributed across multiple sites andinterconnected by a communication network.

The processes and logic flows described in this document can beperformed by one or more programmable processors executing one or morecomputer programs to perform functions by operating on input data andgenerating output. The processes and logic flows can also be performedby, and apparatus can also be implemented as, special purpose logiccircuitry, e.g., an FPGA (field programmable gate array) or an ASIC(application specific integrated circuit).

Processors suitable for the execution of a computer program include, byway of example, both general and special purpose microprocessors, andany one or more processors of any kind of digital computer. Generally, aprocessor will receive instructions and data from a read only memory ora random-access memory or both. The essential elements of a computer area processor for performing instructions and one or more memory devicesfor storing instructions and data. Generally, a computer will alsoinclude, or be operatively coupled to receive data from or transfer datato, or both, one or more mass storage devices for storing data, e.g.,magnetic, magneto optical disks, or optical disks. However, a computerneed not have such devices. Computer readable media suitable for storingcomputer program instructions and data include all forms of non-volatilememory, media and memory devices, including by way of examplesemiconductor memory devices, e.g., EPROM, EEPROM, and flash memorydevices; magnetic disks, e.g., internal hard disks or removable disks;magneto optical disks; and CD ROM and DVD-ROM disks. The processor andthe memory can be supplemented by, or incorporated in, special purposelogic circuitry.

While this patent document contains many specifics, these should not beconstrued as limitations on the scope of any subject matter or of whatmay be claimed, but rather as descriptions of features that may bespecific to particular embodiments of particular techniques. Certainfeatures that are described in this patent document in the context ofseparate embodiments can also be implemented in combination in a singleembodiment. Conversely, various features that are described in thecontext of a single embodiment can also be implemented in multipleembodiments separately or in any suitable subcombination. Moreover,although features may be described above as acting in certaincombinations and even initially claimed as such, one or more featuresfrom a claimed combination can in some cases be excised from thecombination, and the claimed combination may be directed to asubcombination or variation of a subcombination.

Similarly, while operations are depicted in the drawings in a particularorder, this should not be understood as requiring that such operationsbe performed in the particular order shown or in sequential order, orthat all illustrated operations be performed, to achieve desirableresults. Moreover, the separation of various system components in theembodiments described in this patent document should not be understoodas requiring such separation in all embodiments.

Only a few implementations and examples are described and otherimplementations, enhancements and variations can be made based on whatis described and illustrated in this patent document.

1. A method of processing video data, comprising: determining, for aconversion between a video unit of a video and a bitstream of the video,a sub-picture coding mode is enabled for the video unit, wherein thevideo unit comprises one or more video pictures, partitioning, a videopicture in the video unit into multiple coding tree blocks and the videopicture into one or more sub-pictures according to a rule, performingthe conversion between the video unit and the bitstream based on thepartitioning, wherein the rule specifies that a boundary between any twosub-pictures is also a boundary between two coding tree blocks, and thata coding tree block is not allowed to cover more than one sub-pictures.2. The method of claim 1, wherein a first syntax element and a secondsyntax element are included in the bitstream, wherein the first syntaxelement specifies a width of a sub-picture in units of a width of acoding tree block, and the second syntax element specifies a height of asub-picture in units of a height of a coding tree block.
 3. The methodof claim 1, wherein any position in the video picture is constrained tobe covered by only one subpicture.
 4. The method of claim 1, wherein thetwo sub-pictures of the video picture have no overlapping area.
 5. Themethod of claim 1, wherein a sub-picture is constrained to have arectangular shape.
 6. The method of claim 5, wherein the sub-picturecomprises rectangular slices.
 7. The method of claim 1, wherein a thirdsyntax element indicating the sub-picture coding mode is enabled isincluded in a sequence parameter set in the bitstream.
 8. The method ofclaim 1, wherein a sub-picture is applicable to only selected one ormore layers of the video.
 9. The method of claim 8, wherein sub-picturesare defined for a certain layer and are mapped to other layers.
 10. Themethod of claim 1, wherein the conversion comprises encoding the videointo the bitstream.
 11. The method of claim 1, wherein the conversioncomprises decoding the video from the bitstream.
 12. An apparatus forprocessing video data comprising a processor and a non-transitory memorywith instructions thereon, wherein the instructions upon execution bythe processor, cause the processor to: determine, for a conversionbetween a video unit of a video and a bitstream of the video, asub-picture coding mode is enabled for the video unit, wherein the videounit comprises one or more video pictures, partition, a video picture inthe video unit into multiple coding tree blocks and the video pictureinto one or more sub-pictures according to a rule, perform theconversion between the video unit and the bitstream based on thepartitioning, wherein the rule specifies that a boundary between any twosub-pictures is also a boundary between two coding tree blocks, and thata coding tree block is not allowed to cover more than one sub-pictures.13. The apparatus of claim 12, wherein a first syntax element and asecond syntax element are included in the bitstream, wherein the firstsyntax element specifies a width of a sub-picture in units of a width ofa coding tree block, and the second syntax element specifies a height ofa sub-picture in units of a height of a coding tree block.
 14. Theapparatus of claim 12, wherein any position in the video picture isconstrained to be covered by only one subpicture.
 15. The apparatus ofclaim 12, wherein the two sub-pictures of the video picture have nooverlapping area.
 16. The apparatus of claim 12, wherein a sub-pictureis constrained to have a rectangular shape.
 17. The apparatus of claim16, wherein the sub-picture comprises rectangular slices.
 18. Theapparatus of claim 12, wherein a third syntax element indicating thesub-picture coding mode is enabled is included in a sequence parameterset in the bitstream.
 19. A non-transitory computer-readable storagemedium storing instructions that cause a processor to: determine, for aconversion between a video unit of a video and a bitstream of the video,a sub-picture coding mode is enabled for the video unit, wherein thevideo unit comprises one or more video pictures, partition, a videopicture in the video unit into multiple coding tree blocks and the videopicture into one or more sub-pictures according to a rule, perform theconversion between the video unit and the bitstream based on thepartitioning, wherein the rule specifies that a boundary between any twosub-pictures is also a boundary between two coding tree blocks, and thata coding tree block is not allowed to cover more than one sub-pictures.20. A non-transitory computer-readable recording medium storing abitstream of a video which is generated by a method performed by a videoprocessing apparatus, wherein the method comprises: determining, for avideo unit of a video, a sub-picture coding mode is enabled for thevideo unit, wherein the video unit comprises one or more video pictures,partitioning, a video picture in the video unit into multiple codingtree blocks and the video picture into one or more sub-picturesaccording to a rule, generating the bitstream based on the partitioning,wherein the rule specifies that a boundary between any two sub-picturesis also a boundary between two coding tree blocks, and that a codingtree block is not allowed to cover more than one sub-pictures.